lsp refactor
This commit is contained in:
parent
96c638f4bc
commit
2386de2158
1 changed files with 11 additions and 11 deletions
|
@ -208,25 +208,25 @@ vim.list_extend(ensure_installed, {
|
|||
'stylua',
|
||||
'typstyle',
|
||||
'prettier',
|
||||
'rust-analyzer',
|
||||
'clangd',
|
||||
})
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = ensure_installed,
|
||||
automatic_installation = true,
|
||||
automatic_enable = true,
|
||||
handlers = {
|
||||
function(server_name)
|
||||
print('setting up' + server_name)
|
||||
local server = servers[server_name] or {}
|
||||
}
|
||||
|
||||
-- some things work weird
|
||||
local lspconfig = require 'lspconfig'
|
||||
|
||||
for server_name, server in pairs(servers) do
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
-- some things work weird
|
||||
local lspconfig = require 'lspconfig'
|
||||
lspconfig.gdscript.setup {}
|
||||
|
|
Loading…
Add table
Reference in a new issue