config-astronvim/lua/custom/autocmds/text.lua
2024-05-22 16:12:36 +02:00

10 lines
327 B
Lua

vim.api.nvim_create_autocmd("FileType", {
desc = "Enable wrap and spell for text like documents",
group = vim.api.nvim_create_augroup("auto_spell", { clear = true }),
pattern = { "gitcommit", "markdown", "text", "plaintex" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})