-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsserver is deprecated, use ts_ls instead. Feature will be removed in lspconfig 0.2.0 #88
Comments
Here's the change you need to make: And then modify the original code which looks like this: mason_lspconfig.setup_handlers({
-- default handler for installed servers
function(server_name)
lspconfig[server_name].setup({
capabilities = capabilities,
})
end,
... To this: 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,
})
end,
... And then open nvim and do the following: Credits: |
Thank you so much man, it works! |
For those who come later, the remapping from mason-lspconfig to ts_ls is now complete. |
So, I tried to change tsserver to ts_ls in the mason.lua file, but I got this message when I try to run nvim: [mason-lspconfig.nvim] Server "ts_ls" is not a valid entry in ensure_installed. Make su
re to only provide lspconfig server names.
The text was updated successfully, but these errors were encountered: