From d45105cc2e89388d34b17082efce433c166392c1 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Thu, 13 Jun 2024 09:07:44 +0100 Subject: [PATCH] nvim: formatoptions for norg --- nvim/ftplugin/norg.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 nvim/ftplugin/norg.lua diff --git a/nvim/ftplugin/norg.lua b/nvim/ftplugin/norg.lua new file mode 100644 index 0000000..62ca176 --- /dev/null +++ b/nvim/ftplugin/norg.lua @@ -0,0 +1,6 @@ +vim.opt_local.formatoptions:remove("r") -- don't insert comment leader after enter +vim.opt_local.formatoptions:remove("n") -- don't indent after enumerations +vim.opt_local.formatoptions:append("w") -- trailing space continues paragraph +vim.opt_local.formatoptions:append("a") -- auto format paragraphs + +vim.opt_local.cpoptions:append("I") -- don't delete indent when moving up/down -- 2.48.1