22 lines
524 B
Lua
22 lines
524 B
Lua
|
local mason_lspconfig = require 'mason-lspconfig'
|
||
|
|
||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||
|
|
||
|
local servers = {
|
||
|
tsserver = {},
|
||
|
}
|
||
|
|
||
|
mason_lspconfig.setup {
|
||
|
ensure_installed = vim.tbl_keys(servers),
|
||
|
}
|
||
|
|
||
|
mason_lspconfig.setup_handlers {
|
||
|
function(server_name)
|
||
|
require('lspconfig')[server_name].setup {
|
||
|
capabilities = capabilities,
|
||
|
on_attach = on_attach,
|
||
|
settings = servers[server_name],
|
||
|
}
|
||
|
end,
|
||
|
}
|