27 lines
928 B
Lua
27 lines
928 B
Lua
return {
|
|
'kevinhwang91/nvim-ufo',
|
|
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
|
|
|
|
vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
|
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
capabilities.textDocument.foldingRange = {
|
|
dynamicRegistration = false,
|
|
lineFoldingOnly = true,
|
|
}
|
|
local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
|
|
for _, ls in ipairs(language_servers) do
|
|
require('lspconfig')[ls].setup {
|
|
capabilities = capabilities,
|
|
-- you can add other fields for setting up lsp server in this table
|
|
}
|
|
end
|
|
require('ufo').setup {}
|
|
end,
|
|
|
|
dependencies = { 'kevinhwang91/promise-async' },
|
|
}
|