]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/ftplugin/norg.lua
nvim: formatoptions for norg
[dotfiles.git] / nvim / ftplugin / norg.lua
diff --git a/nvim/ftplugin/norg.lua b/nvim/ftplugin/norg.lua
new file mode 100644 (file)
index 0000000..62ca176
--- /dev/null
@@ -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