X-Git-Url: https://git.madduck.net/etc/lazyvim.git/blobdiff_plain/5ee63d43d87e25fda83e9187473ffec982945dcc..c9fb929a035238e0b4c702bf0e68729c433aedc9:/.config/lazyvim/after/ftplugin/mail.lua diff --git a/.config/lazyvim/after/ftplugin/mail.lua b/.config/lazyvim/after/ftplugin/mail.lua index afa4c39..36c6ead 100644 --- a/.config/lazyvim/after/ftplugin/mail.lua +++ b/.config/lazyvim/after/ftplugin/mail.lua @@ -1,3 +1,18 @@ +local i, _ = string.find(vim.bo.filetype, "markdown") +if not i then + vim.opt_local.filetype = "mail.markdown" + -- this should trigger a reload of the ftplugin + return +end + +-- There are no diagnostics for mail, but we do not want the +-- Markdown standards imposed on mail header and signature… +vim.diagnostic.enable(false) +vim.b.autoformat = false + +-- disable Treesitter format expression for Mail +vim.opt_local.formatexpr = "" + vim.opt_local.formatoptions:remove("o") vim.opt_local.formatoptions:remove("r") vim.opt_local.formatoptions:remove("l")