addu fo
This commit is contained in:
parent
a9eb823562
commit
57ebcec73a
3 changed files with 32 additions and 6 deletions
23
lua/custom/plugins/ufo-folding.lua
Normal file
23
lua/custom/plugins/ufo-folding.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
'kevinhwang91/nvim-ufo',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'kevinhwang91/promise-async',
|
||||
},
|
||||
config = function()
|
||||
vim.o.foldcolumn = '1' -- '0' is not bad
|
||||
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`. If Neovim is 0.6.1, remap yourself
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
|
||||
require('ufo').setup {
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return { 'treesitter', 'indent' }
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue