diff options
Diffstat (limited to '')
| -rw-r--r-- | after/ftplugin/mail.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/after/ftplugin/mail.lua b/after/ftplugin/mail.lua new file mode 100644 index 0000000..aa09b50 --- /dev/null +++ b/after/ftplugin/mail.lua @@ -0,0 +1,20 @@ +-- Detect mutt temporary files as mail +vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = { "/tmp/mutt-*", "/tmp/neomutt-*" }, + callback = function() + vim.bo.filetype = "mail" + end, +}) + +-- Set options for mutt temp files in /tmp +vim.api.nvim_create_autocmd("BufRead", { + pattern = { "/tmp/mutt-*", "/tmp/neomutt-*" }, + callback = function() + vim.opt_local.textwidth = 72 + end, +}) + +-- Mail ftplugin settings +vim.opt_local.textwidth = 72 +vim.opt_local.colorcolumn = "72" +vim.opt_local.spell = true |
