fix: update mason-lspconfig setup to not use deprecated handlers
This commit is contained in:
parent
3338d39206
commit
d8241e9eb5
13
init.lua
13
init.lua
|
@ -721,18 +721,17 @@ require('lazy').setup({
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
||||||
automatic_installation = false,
|
automatic_enable = false,
|
||||||
handlers = {
|
}
|
||||||
function(server_name)
|
|
||||||
local server = servers[server_name] or {}
|
for server_name, server_config in pairs(servers) do
|
||||||
|
local server = server_config or {}
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end,
|
end
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue