Versions 3 Upgrade guide for none-vscode editors. #5456
Replies: 3 comments 26 replies
-
Hey guys 👋🏻 I'm encountering an error in a newly created project (using I obviously added a couple of log lines: I'm sure I'm missing something simple. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
It doesn't seem to be working correctly in Helix for me.
Here is my configuration:
My setup is based on the discussion in helix-editor/helix#10691 and https://github.com/helix-editor/helix/blob/25.01.1/languages.toml#L119. The only modification I've made is removing the hybridMode and tsdk settings. Am I missing any necessary configuration? |
Beta Was this translation helpful? Give feedback.
-
Hi I have a follow-up question / issue :) I'm using inlay hints (https://github.com/yamafaktory/.config/blob/2f18977151a3a2fccf90e942c083051f070514e8/nvim/init.lua#L668) and somehow facing this issue quite often: Error in decoration provider "win" (ns=nvim.lsp.inlayhint):
Error executing lua: /usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:349: Invalid 'col': out of range
stack traceback:
[C]: in function 'nvim_buf_set_extmark'
/usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:349: in function </usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:303> Any idea? Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: In version 3, there's one breaking change that require handled at lsp client side. For example, see how neovim config it here
What has changed and why?
For the user side, there are two things changed:
The way vue language server communicate with typescript language server.
In version 2, in order to drop the takeover mode for a more compatible solution with typescript language server, another layer of complexity was introduced (named pipes server) to help vue language server communicate with typescript language server(vue tsserver plugin). However, it seems caused many issues since v2 was released. Therefore, in the new major version, it has been removed and the responsibility of communication transferred to the lsp client side.
Option
typescript.tsdk
has dropped.Now
typescript
is a peer dependency. See detail hereHow do I migrate to version 3?
Migrating to version 3 is quite simple, create a client handler for vue language server, when receiving the request, forward it to typescript language server and finally send the payload from typescript language server back to vue language server. We have an example for neovim users here.
FAQ
What's the request and response name I should handle/send to vue language server?
The request and response names are not configurable:
tsserver/request
tsserver/response
Can I use any existing typescript language server?
No, vue LSP currently only work with
vtsls
.The reason is that ts_ls Currently does not handle the command
typescript.tsserverRequest
see: https://github.com/typescript-language-server/typescript-language-server/blob/0a034dae6c777733f4c2f6d5b151c5ef781fb662/src/lsp-server.ts#L838-L940I cannot get it to work.
If you cannot get the vue language server to work, there's few things you can check yourself first:
tsserver/request
and what's the typescript language server response etc.If thing really not working on your machine please open a new issue with a Minimal Reproduction for both your vue project and editor configuration. (We do not have experience in all editors, so we might need the community's help.)
Beta Was this translation helpful? Give feedback.
All reactions