fix(tsserver-deprecation): use ts_ls where tsserver is being used in lspconfig

This commit is contained in:
Nitish Lobo 2024-09-06 11:43:45 +10:00
parent cb670e8890
commit 567fcbd4b1

View file

@ -81,6 +81,16 @@ return {
mason_lspconfig.setup_handlers({
-- default handler for installed servers
function(server_name)
-- https://github.com/neovim/nvim-lspconfig/pull/3232#issuecomment-2331025714
if server_name == "tsserver" then
server_name = "ts_ls"
end
local capabilities = require("cmp_nvim_lsp").default_capabilities()
require("lspconfig")[server_name].setup({
capabilities = capabilities,
})
lspconfig[server_name].setup({
capabilities = capabilities,
})