2022-12-23 11:57:25 +00:00
|
|
|
require('mason').setup()
|
2022-12-23 10:28:12 +00:00
|
|
|
|
|
|
|
local servers = {
|
|
|
|
tsserver = {},
|
2022-12-23 11:57:25 +00:00
|
|
|
|
|
|
|
sumneko_lua = {
|
|
|
|
Lua = {
|
|
|
|
workspace = { checkThirdParty = false },
|
|
|
|
telemetry = { enable = false },
|
|
|
|
},
|
|
|
|
},
|
2022-12-23 10:28:12 +00:00
|
|
|
}
|
|
|
|
|
2022-12-23 11:57:25 +00:00
|
|
|
-- Ensure the servers above are installed
|
|
|
|
local mason_lspconfig = require 'mason-lspconfig'
|
|
|
|
|
2022-12-23 10:28:12 +00:00
|
|
|
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,
|
|
|
|
}
|