mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user