mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 14:29:02 +00:00
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|.
13 lines
355 B
Lua
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,
|
|
})
|