SoloVim/lua/plugins/ufo.lua
2024-05-24 17:10:39 +03:00

44 lines
734 B
Lua

return {
"kevinhwang91/nvim-ufo",
dependencies = { "kevinhwang91/promise-async" },
enabled = false,
keys = {
{
"zR",
function()
require("ufo").openAllFolds()
end,
desc = "Open all folds",
},
{
"zM",
function()
require("ufo").closeAllFolds()
end,
desc = "Close all folds",
},
{
"zK",
function()
require("ufo").peekFoldedLinesUnderCursor()
end,
desc = "Peek fold",
},
},
opts = {
close_fold_kinds_for_ft = {
default = { "imports", "comment" },
json = { "array" },
c = { "comment", "region" },
},
preview = {
win_config = {
winblend = 0,
},
},
provider_selector = function(_, filetype, buftype)
return { "lsp", "treesitter" }
end,
},
}