fix(tsserver-deprecation): use ts_ls where tsserver is being used in lspconfig#89
Open
nitishlobo wants to merge 2 commits intojosean-dev:mainfrom
Open
fix(tsserver-deprecation): use ts_ls where tsserver is being used in lspconfig#89nitishlobo wants to merge 2 commits intojosean-dev:mainfrom
nitishlobo wants to merge 2 commits intojosean-dev:mainfrom
Conversation
Author
|
@josean-dev @RigottiG @MarkCodesTheWeb @aspehler @kannicht @pieterjan84 @santiagohervella @s4Dt0y |
|
If the problem resides in the fact that lspconfig renamed -- default handler for installed servers
function(server_name)
lspconfig[server_name].setup({
capabilities = capabilities,
})
end,
-- mason still installs `tsserver`
["tsserver"] = function()
-- lspconfig sees `ts_ls`
lspconfig["ts_ls"].setup({
capabilities = capabilities,
...
end,The result of vim.lsp: require("vim.lsp.health").check()
- LSP log level : WARN
- Log path: /Users/Mccranky/.local/state/nvim/lsp.log
- Log size: 9460 KB
vim.lsp: Active Clients ~
- ts_ls (id: 1)
Root directory: nil
Command: /Users/Mccranky/.local/share/nvim/mason/bin/typescript-language-server --stdio
Settings: vim.empty_dict()
Attached buffers: 1
- emmet_ls (id: 2)
Root directory: nil
Command: /Users/Mccranky/.local/share/nvim/mason/bin/emmet-ls --stdio
Settings: vim.empty_dict()
Attached buffers: 1
- copilot (id: 3)
Command: node /Users/Mccranky/.local/share/nvim/lazy/copilot.lua/copilot/index.js
Settings: {
advanced = {
inlineSuggestCount = 3,
listCount = 10
}
}
Attached buffers: 1, 6 |
isandesh7
reviewed
Sep 10, 2024
There was a problem hiding this comment.
I tested the change. I'm still getting ERROR -
- Pasted the contents of the modified file as is.
- Ran the provided reload command
- Restarted nvim
- Observed same issue.
[mason-lspconfig.nvim] Server "tsserver" is not a valid entry in ensure_installed. Make sure to only p
rovide lspconfig server names.
changing this to
ts_ls worked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR addresses the following error when opening nvim:
"tsserver is deprecated, use ts_ls instead. Feature will be removed in lspconfig 0.2.0"
The issue was raised here:
#88
The solution was given here:
neovim/nvim-lspconfig#3232 (comment)
Note that you may need to do a reload of the related plugins:
:Lazy reload mason.nvim mason-lspconfig.nvim mason-tool-installer.nvim