diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-02-06 10:01:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 10:01:38 +0100 |
commit | e1f03c481a1cf87cead2c5af66b36dbdfbb9a983 (patch) | |
tree | 09e75e1385c862d85a639c13df2dc876921353a1 /src/nvim/optionstr.c | |
parent | 1675f0e270579036c454c38f28e650b60a3fba1a (diff) | |
download | rneovim-e1f03c481a1cf87cead2c5af66b36dbdfbb9a983.tar.gz rneovim-e1f03c481a1cf87cead2c5af66b36dbdfbb9a983.tar.bz2 rneovim-e1f03c481a1cf87cead2c5af66b36dbdfbb9a983.zip |
feat(spell): also source `spell/LANG.lua` when setting `spelllang` (#22111)
Problem: only Vimscript files are sourced when setting spelling language
Solution: also source Lua files after sourcing Vimscript files
Closes #22110
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index ca50c3ab00..901477d869 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -1581,7 +1581,7 @@ static void do_spelllang_source(win_T *win) q += 4; } - // Source the spell/LANG.vim in 'runtimepath'. + // Source the spell/LANG.{vim,lua} in 'runtimepath'. // They could set 'spellcapcheck' depending on the language. // Use the first name in 'spelllang' up to '_region' or // '.encoding'. @@ -1592,7 +1592,7 @@ static void do_spelllang_source(win_T *win) } } if (p > q) { - vim_snprintf(fname, sizeof(fname), "spell/%.*s.vim", (int)(p - q), q); + vim_snprintf(fname, sizeof(fname), "spell/%.*s.\\(vim\\|lua\\)", (int)(p - q), q); source_runtime(fname, DIP_ALL); } } |