dotfiles/nvim/lua/plugins/mason/lspconfig/init.lua

22 lines
524 B
Lua
Raw Normal View History

2022-12-23 10:28:12 +00:00
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,
}