Closed ic-768 closed 1 week ago
Yup, I just stumbled into this.
So I deleted the installed tsserver binary via Mason, and then updated my nvim config to replace tsserver
with ts_ls
but now I get the warning...
[mason-lspconfig.nvim] Server "ts_ls" is not a valid entry in ensure_installed. Make sure to only provide lspconfig server names.
I realise this is because Mason hasn't been updated to reflect the change and so I can't actually install ts_ls
via Mason.
Yup, I just stumbled into this.
So I deleted the installed tsserver binary via Mason, and then updated my nvim config to replace
tsserver
withts_ls
but now I get the warning...[mason-lspconfig.nvim] Server "ts_ls" is not a valid entry in ensure_installed. Make sure to only provide lspconfig server names.
I realise this is because Mason hasn't been updated to reflect the change and so I can't actually install
ts_ls
via Mason.
if it's of any help until this gets resolved, you can see how i handled the name change in my config here.
I cannot change it, MasonUninstall tsserver gives the error "tsserver is not a valid package. So does MasonInstall ts_ls: "ts_ls" is not a valid package.
What to do?
run this command in your terminal:
npm install -g typescript-language-server typescript
config file:
local lspconfig = require("lspconfig") lspconfig["ts_ls"].setup({})
run this command in your terminal:
npm install -g typescript-language-server typescript
config file:
local lspconfig = require("lspconfig") lspconfig["ts_ls"].setup({})
it works perfectly, thanks :)
Problem description
Per https://github.com/neovim/nvim-lspconfig/pull/3232,
if you install
tsserver
throughmason-lspconfig
, then you will get a deprecation warning fromnvim-lspconfig
telling you to rename it tots_ls
.Why do you think this is an issue with mason-lspconfig.nvim?
If it's not, then I'm mistaken and I'm sorry
Neovim version (>= 0.7)
11
Operating system/version
Ubuntu
I've manually reviewed the Nvim LPS client log (
:LspLog
) to find potential errorsI've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig
Affected language servers
tsserver
Steps to reproduce
snippet:
Actual behavior
Deprecation error
Expected behavior
No deprecation error
LspInfo
LspLog
No response
Healthcheck
Screenshots or recordings
No response