mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-23 16:06:48 +00:00
16 lines
509 B
Lua
16 lines
509 B
Lua
local ufo = require("ufo")
|
|
|
|
ufo.setup({
|
|
provider_selector = function(bufnr, filetype, buftype)
|
|
return { "treesitter", "indent" }
|
|
end,
|
|
})
|
|
|
|
local keymap = vim.keymap.set
|
|
|
|
keymap("n", "zR", ufo.openAllFolds, { desc = "Open all folds" })
|
|
keymap("n", "zM", ufo.closeAllFolds, { desc = "Close all folds" })
|
|
keymap("n", "zr", ufo.openFoldsExceptKinds, { desc = "Fold less" })
|
|
keymap("n", "zm", ufo.closeFoldsWith, { desc = "Fold more" })
|
|
keymap("n", "zp", ufo.peekFoldedLinesUnderCursor, { desc = "Peek fold" })
|