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(vscode): automatically enable Hybrid Mode #4206

Merged
merged 6 commits into from Apr 4, 2024

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Apr 4, 2024

Closes #4131

This introduces the default value of "auto" for vue.server.hybridMode, which automatically enables it based on the compatibility of installed TS plugin extensions with Hybrid Mode.

The following TS plugin extensions are currently known to be compatible:

Extensions

The following TS plugins are currently known to be incompatible.

Extensions

  • styled-components.vscode-styled-components
  • svelte.svelte-vscode (<108.4.0)
  • Divlo.vscode-styled-jsx-languageserver
  • denoland.vscode-deno (When deno.enable is true)
  • nrwl.angular-console

NPM packages

  • typescript-lit-html-plugin
  • typescript-plugin-css-modules

If you know of any other compatible TS plugin extensions, please report them here so that we can update the whitelist.

To verify compatibility, simply set "vue.server.hybridMode": true in your VSCode settings and reload VSCode to check if TS support in .vue files is working as expected.

@johnsoncodehk johnsoncodehk merged commit 9965d56 into master Apr 4, 2024
6 checks passed
@johnsoncodehk johnsoncodehk deleted the auto-hybrid-mode branch April 4, 2024 11:00
@imal1
Copy link

imal1 commented Apr 12, 2024

bierner.lit-html

@Peruibeloko
Copy link

denoland.vscode-deno should be compatible, as long as its not enabled (which is not by default)

The setting for this is deno.enable and should be set on a workspace basis

@Soviut
Copy link

Soviut commented Apr 15, 2024

I got the message that jpoissonnier.vscode-styled-components is incompatible, but I don't even have that installed.

@rogadev
Copy link

rogadev commented Apr 17, 2024

image
I'd really love if this message stopped popping up every time I open one of my Nuxt applications. 🤷

@cannap
Copy link

cannap commented Apr 18, 2024

got this
image

@johnsoncodehk
Copy link
Member Author

johnsoncodehk commented Apr 18, 2024

@rogadev You can disable svelte.svelte-vscode in the Vue project workspace to have Hybrid Mode automatically enabled, or set "vue.server.hybridMode": false to explicitly disable Hybrid Mode to avoid message box.

@johnsoncodehk
Copy link
Member Author

@Peruibeloko Did you find that installed denoland.vscode-deno and setting deno.enable to true breaks Hybrid Mode?

@Peruibeloko
Copy link

@johnsoncodehk I'll do some testing tomorrow on a clean project using pnpm create vite, but IIRC Deno doesn't even has to be enabled for Volar to report it

@k-paxian
Copy link

image

@johnsoncodehk
Copy link
Member Author

@k-paxian It is known that denoland.vscode-deno is incompatible with Hybrid Mode when enabled. I will check for nrwl.angular-console.

johnsoncodehk added a commit that referenced this pull request Apr 26, 2024
@Kerumen
Copy link

Kerumen commented May 1, 2024

Same as @Soviut, I have the message about jpoissonnier.vscode-styled-components being incompatible but I don't have this installed.

@johnsoncodehk
Copy link
Member Author

image

@Kerumen I think the extension ID of jpoissonnier.vscode-styled-components has been changed to styled-components.vscode-styled-components, have you installed that extension?

@Kerumen
Copy link

Kerumen commented May 2, 2024

image @Kerumen I think the extension ID of `jpoissonnier.vscode-styled-components` has been changed to `styled-components.vscode-styled-components`, have you installed that extension?

Maybe in the past but I don't have it installed anymore. I tried to reinstall / uninstall it and it still displays the same message.

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.

[Feature] Automatically enable Hybrid Mode
8 participants