Files
neovim/runtime/plugin/nvim/spellfile.lua
Yochem van Rosmalen 9bdb011a50 refactor(spellfile): config() interface, docs #36481
Problem:
- Exposing the raw config as table is a pattern not seen anywhere else
  in the Nvim codebase.
- Old spellfile.vim docs still available, no new documentation

Solution:
- Exposing a `config()` function that both acts as "getter" and "setter"
  is a much more common idiom (e.g. vim.lsp, vim.diagnostic).
- Add new documentation and link old docs to |spellfile.lua| instead of
  |spellfile.vim|.
2025-11-09 21:51:39 -08:00

13 lines
355 B
Lua

if vim.g.loaded_spellfile_plugin ~= nil then
return
end
vim.g.loaded_spellfile_plugin = true
vim.api.nvim_create_autocmd('SpellFileMissing', {
group = vim.api.nvim_create_augroup('nvim.spellfile', {}),
desc = 'Download missing spell files when setting spelllang',
callback = function(args)
require('nvim.spellfile').get(args.match)
end,
})