From f1b3356689003abe9edb5a46d4a091b0a41d7306 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Fri, 13 Feb 2026 07:46:40 +0530 Subject: moving vimscript configs to lua config Signed-off-by: Brahmajit Das --- after/ftplugin/mail.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 after/ftplugin/mail.lua (limited to 'after/ftplugin/mail.lua') 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 -- cgit v1.2.3