1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00
jdhao-nvim-config/lua/lsp_utils.lua
jdhao be862a83d6
Use new lsp configuration structure (#403)
In this new structure, the main configuration for a LSP server is
provided by the plugin nvim-lspconfig.
Some of the config may be overridden by the configuration under
directory `after/lsp/xxx.lua`, where `xxx` is the lsp server name used
by nvim-lspconfig.

Note that it is necessary to put the custom lsp server configuration
under `after/` directory, in order to correctly override the config
provided by nvim-lspconfig.
2025-04-26 17:19:46 +02:00

16 lines
295 B
Lua

local M = {}
M.get_default_capabilities = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- required by nvim-ufo
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
return capabilities
end
return M