1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/ufo.lua

19 lines
558 B
Lua
Raw Normal View History

2022-12-26 20:07:10 +01:00
local M = {}
function M.setup()
vim.o.foldcolumn = '0'
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
-- Using ufo provider need remap `zR` and `zM`.
2022-12-27 14:02:03 +01:00
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
2022-12-26 20:07:10 +01:00
-- Tell the server the capability of foldingRange,
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
2022-12-27 14:02:03 +01:00
require('ufo').setup()
2022-12-26 20:07:10 +01:00
end
return M