updated spellcheck with keybinds and default off on most filetypes

This commit is contained in:
venus
2026-03-25 11:02:49 -05:00
parent eec1f820fc
commit 405659af0a
6 changed files with 27 additions and 7 deletions

View File

@@ -31,3 +31,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end,
})
-- Create an augroup to manage our spellcheck autocommands
local spell_group = vim.api.nvim_create_augroup("EnableSpellcheck", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
group = spell_group,
-- List the filetypes you want to enable spellcheck for
pattern = { "markdown", "text", "gitcommit", "latex", "plaintex" },
callback = function()
vim.opt_local.spell = true
vim.opt_local.spelllang = "en_us" -- Optional: set your preferred language
vim.opt_local.spelloptions = "camel"
end,
})