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',
|
'stylua',
|
||||||
'typstyle',
|
'typstyle',
|
||||||
'prettier',
|
'prettier',
|
||||||
|
'rust-analyzer',
|
||||||
|
'clangd',
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = ensure_installed,
|
ensure_installed = ensure_installed,
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
print('setting up' + server_name)
|
|
||||||
local server = servers[server_name] or {}
|
|
||||||
-- 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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- some things work weird
|
-- some things work weird
|
||||||
local lspconfig = require 'lspconfig'
|
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
|
||||||
|
|
||||||
lspconfig.gdscript.setup {}
|
lspconfig.gdscript.setup {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue