]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/editor.lua
nvim: use nvim-origami for folds
[dotfiles.git] / nvim / lua / plugins / editor.lua
index f5bfd74a67b3b2b7349a1f0dbe303b77717c38a1..249ac6d16f9745bcf2375f29585af5da5e2b7ae9 100644 (file)
@@ -182,6 +182,23 @@ return {
       end,
     },
   },
       end,
     },
   },
+  { "chrisgrieser/nvim-origami", -- fold with elegance
+    event = "VeryLazy",
+    opts = {
+      foldKeymaps = { setup = false },
+      foldtext = {
+        padding = 1,
+        lineCount = {
+          template = "…  %d lines"
+        }
+      }
+    },
+    init = function()
+      -- disable vim's folding
+      vim.opt.foldlevel = 99
+      vim.opt.foldlevelstart = 99
+    end
+  },
 
   -- TODO: currently unused plugins, check and enable/remove
   { "MagicDuck/grug-far.nvim", enabled = false,
 
   -- TODO: currently unused plugins, check and enable/remove
   { "MagicDuck/grug-far.nvim", enabled = false,