Versions 3 Upgrade guide for none-vscode editors. #5456
RayGuo-ergou
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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