Skip to content
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

feat: reintroducing the complete language server #4119

Merged
merged 11 commits into from Mar 20, 2024
Merged

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Mar 19, 2024

closes #3942, closes #3962

We migrated to the TS plugin in 2.0 to resolve many issues with v1, unfortunately it had many issues with compatibility:

  • VSCode <= 1.87 bundled Node version breaks tsserver + @vue/typescript-plugin in some environments.
  • Even if @vue/typescript-plugin only provides vue virtual code and handles mapping, it still causes performance problems in tsserver in some TS versions.
  • Whenever any TS plugin crashes in a .vue file, it will cause @vue/typescript-plugin to be invalidated and make intellisense completely wrong. This is a fault-tolerance problem of the TS LS plugin architecture.

These issues are beyond our control, so we reintroduced the v1 complete LSP server and only switched to Hybrid Mode when explicitly enabled by the user.

@johnsoncodehk johnsoncodehk marked this pull request as ready for review March 20, 2024 01:38
@johnsoncodehk johnsoncodehk merged commit 3758474 into master Mar 20, 2024
6 checks passed
@johnsoncodehk johnsoncodehk deleted the full-lsp-server branch March 20, 2024 01:41
@altrusl
Copy link

altrusl commented Mar 20, 2024

@johnsoncodehk

That was a hard time
Thank you for your work

@Stanzilla
Copy link

So what's the recommended setup for TypeScript users now? Do we need the extra VSC extension again?

@so1ve
Copy link
Member

so1ve commented Mar 21, 2024

@Stanzilla No, you only need the Vue - Official plugin.

@Stanzilla
Copy link

@Stanzilla No, you only need the Vue - Official plugin.

And Hybrid Mode enabled, right? Would make more sense if this was called something like enable TypeScript support maybe?

@so1ve
Copy link
Member

so1ve commented Mar 21, 2024

And Hybrid Mode enabled, right? Would make more sense if this was called something like enable TypeScript support maybe?

If you have TS 5.3+ installed and have a tsconfig.json or jsconfig.json, feel free to enable it.

if this was called something like enable TypeScript support maybe

Not exact. "Hybrid Mode" means Vue Language Tools makes the built-in TS service to run on .vue files, and if you disable hybrid mode we a two separate TS language server on .vue files.

@gegoune
Copy link

gegoune commented Mar 21, 2024

Would be very helpful to have a comparison table of two solutions/approaches. Not being much experienced in tooling for JS I struggle to see how to chose what to do, enable hybrid mode? Disable it? What are the benefits of each approach? Downsides?

@johnsoncodehk johnsoncodehk mentioned this pull request Mar 21, 2024
@Stanzilla
Copy link

Would be very helpful to have a comparison table of two solutions/approaches. Not being much experienced in tooling for JS I struggle to see how to chose what to do, enable hybrid mode? Disable it? What are the benefits of each approach? Downsides?

Yes exactly, it's very unclear atm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue server still crashed after upgrading to v2.0.4 in VSCode + Nuxt 3 False positive errors at end-of-file
5 participants