1
1
Fork 0
dotfiles/nvim/lua/plugins/folding.lua
Ava Gaiety W 4a617c1fbb folding
2025-06-21 20:16:03 -06:00

32 lines
901 B
Lua

return {
"chrisgrieser/nvim-origami",
event = "VeryLazy",
opts = {
useLspFoldsWithTreesitterFallback = true, -- required for `autoFold`
pauseFoldsOnSearch = true,
foldtext = {
enabled = true,
padding = 3,
lineCount = {
template = "%d lines", -- `%d` is replaced with the number of folded lines
hlgroup = "Comment",
},
diagnosticsCount = true, -- uses hlgroups and icons from `vim.diagnostic.config().signs`
gitsignsCount = true, -- requires `gitsigns.nvim`
},
autoFold = {
enabled = true,
kinds = { "comment", "imports" }, ---@type lsp.FoldingRangeKind[]
},
foldKeymaps = {
setup = true, -- modifies `h` and `l`
hOnlyOpensOnFirstColumn = false,
},
},
-- recommended: disable vim's auto-folding
init = function()
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
end,
}