34 lines
746 B
Lua
34 lines
746 B
Lua
|
return {
|
||
|
-- add folding range to capabilities
|
||
|
{
|
||
|
"neovim/nvim-lspconfig",
|
||
|
opts = {
|
||
|
capabilities = {
|
||
|
textDocument = {
|
||
|
foldingRange = {
|
||
|
dynamicRegistration = false,
|
||
|
lineFoldingOnly = true,
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
-- add nvim-ufo
|
||
|
{
|
||
|
"kevinhwang91/nvim-ufo",
|
||
|
dependencies = "kevinhwang91/promise-async",
|
||
|
event = "BufReadPost",
|
||
|
opts = {},
|
||
|
|
||
|
init = function()
|
||
|
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||
|
vim.keymap.set("n", "zR", function()
|
||
|
require("ufo").openAllFolds()
|
||
|
end)
|
||
|
vim.keymap.set("n", "zM", function()
|
||
|
require("ufo").closeAllFolds()
|
||
|
end)
|
||
|
end,
|
||
|
},
|
||
|
}
|