From 567fcbd4b11d6c6bbc19ba622432539d9a496122 Mon Sep 17 00:00:00 2001 From: Nitish Lobo Date: Fri, 6 Sep 2024 11:43:45 +1000 Subject: [PATCH] fix(tsserver-deprecation): use ts_ls where tsserver is being used in lspconfig --- .config/nvim/lua/josean/plugins/lsp/lspconfig.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua index 00da4bf..68a03de 100644 --- a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua +++ b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua @@ -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, })