VoidVim/lua/config/plugins/nvimufo.lua

29 lines
764 B
Lua

vim.o.foldcolumn = "auto:9"
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.fillchars = [[eob: ,fold: ,foldopen:󰅀,foldsep:│,foldclose:󰅂]]
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
require('ufo').setup({
open_fold_hl_timeout = 400,
close_fold_kinds = { "imports", "comment" },
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
winblend = 0,
},
mappings = {
scrollU = "<C-u>",
scrollD = "<C-d>",
jumpTop = "[",
jumpBot = "]",
},
},
provider_selector = function(bufnr, filetype, buftype)
return {'treesitter', 'indent'}
end
})