summaryrefslogtreecommitdiff
path: root/after/ftplugin/mail.lua
diff options
context:
space:
mode:
authorBrahmajit Das <listout@listout.xyz>2026-02-13 02:16:40 +0000
committerBrahmajit Das <listout@listout.xyz>2026-02-13 02:16:40 +0000
commitf1b3356689003abe9edb5a46d4a091b0a41d7306 (patch)
tree3f94c38ddf7559f088c581b3270f62f99484477e /after/ftplugin/mail.lua
parent7e35baacfdeeb7f834fa37841c9d3a2189a976d0 (diff)
downloadnvim-f1b3356689003abe9edb5a46d4a091b0a41d7306.tar.gz
moving vimscript configs to lua config
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Diffstat (limited to '')
-rw-r--r--after/ftplugin/mail.lua20
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