-- Check for missing .spl files on startup vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = function() local spell_dir = vim.fn.stdpath("config") .. "/spell" if vim.fn.isdirectory(spell_dir) == 1then local add_files = vim.fn.glob(spell_dir .. "/*.add", false, true) for _, add_file inipairs(add_files) do local spl_file = add_file:gsub("%.add$", ".spl") if vim.fn.filereadable(spl_file) == 0then compile_spell_file(add_file) end end end end, desc = "Generate missing .spl files for existing .add files", })