1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-23 18:26:48 +00:00
dotfiles/.config/nvim/lua/plugins/ufo.lua

16 lines
509 B
Lua
Raw Normal View History

local ufo = require("ufo")
ufo.setup({
2023-07-03 17:16:19 +00:00
provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" }
end,
})
local keymap = vim.keymap.set
2023-07-06 18:35:18 +00:00
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" })