2025-11-10 06:51:39 +01:00
|
|
|
if vim.g.loaded_spellfile_plugin ~= nil then
|
|
|
|
|
return
|
2025-08-08 16:31:57 +01:00
|
|
|
end
|
2025-11-10 06:51:39 +01:00
|
|
|
vim.g.loaded_spellfile_plugin = true
|
2025-08-08 16:31:57 +01:00
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('SpellFileMissing', {
|
2025-11-10 06:51:39 +01:00
|
|
|
group = vim.api.nvim_create_augroup('nvim.spellfile', {}),
|
2025-08-08 16:31:57 +01:00
|
|
|
desc = 'Download missing spell files when setting spelllang',
|
2025-11-10 06:51:39 +01:00
|
|
|
callback = function(args)
|
|
|
|
|
require('nvim.spellfile').get(args.match)
|
|
|
|
|
end,
|
2025-08-08 16:31:57 +01:00
|
|
|
})
|