ufo
This commit is contained in:
@@ -45,6 +45,41 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
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
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
require("ufo").setup()
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{
|
||||
"zR",
|
||||
function()
|
||||
require("ufo").openAllFolds()
|
||||
end,
|
||||
desc = "Open all folds",
|
||||
},
|
||||
{
|
||||
"zM",
|
||||
function()
|
||||
require("ufo").closeAllFolds()
|
||||
end,
|
||||
desc = "Close all folds",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "tzachar/local-highlight.nvim",
|
||||
-- event = "VeryLazy",
|
||||
|
||||
Reference in New Issue
Block a user