updated spellcheck with keybinds and default off on most filetypes
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user