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.

Currently known compatibility

Extension ID Compatible Requirement
unifiedjs.vscode-mdx
astro-build.astro-vscode
ije.esm-vscode
johnsoncodehk.vscode-tsslint
VisualStudioExptTeam.vscodeintellicode
bierner.lit-html
svelte.svelte-vscode svelte.svelte-vscode >= v108.4.0 (PR: sveltejs/language-tools#2317)
mxsdev.typescript-explorer
jenkey2011.string-highlight
miaonster.vscode-tsx-arrow-definition
runem.lit-plugin
kimuson.ts-type-expand
p42ai.refactor
styled-components.vscode-styled-components vue.volar >= v2.0.24 (PR: volarjs/volar.js#216)
Divlo.vscode-styled-jsx-languageserver vue.volar >= v2.0.24 (PR: volarjs/volar.js#216)
nrwl.angular-console vue.volar >= v2.0.24 (PR: volarjs/volar.js#216)
denoland.vscode-deno
NPM Package ID Compatible Requirement
typescript-lit-html-plugin vue.volar >= v2.0.24 (PR: volarjs/volar.js#216)
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.

@sapphi-red
Copy link
Contributor

I got a message with miaonster.vscode-tsx-arrow-definition. It seems to be working with it.

@BaiChenK

This comment was marked as spam.

@arnauddoub
Copy link

Same error with p42ai.refactor extension

@luxaritas
Copy link

Any chance for some clarification on why nrwl.angular-console is marked incompatible? Looking at https://github.com/nrwl/nx-console/tree/master/apps/nxls it seems like their language server is specifically focused on autocompletion for the Nx json configuration files, so I'm curious what's conflicting.

@johnsoncodehk
Copy link
Member Author

johnsoncodehk commented Jun 29, 2024

@luxaritas Via volarjs/volar.js#216, nrwl.angular-console will be compatible with Hybrid Mode starting in the next version (v2.0.24).

@said12345plus
Copy link

said12345plus commented Jul 7, 2024

Hybrid Mode is disabled automatically because there is a potentially incompatible MylesMurphy.prettify-ts TypeScript plugin installed.
image

@ShenQingchuan
Copy link

Hybrid Mode is disabled automatically because there is a potentially incompatible ShenQingchuan.vue-vine-extension TypeScript plugin installed.

I don't quite get it with this message but found this PR page, is there anything need to do in Vue Vine?

@so1ve
Copy link
Member

so1ve commented Jul 8, 2024

@ShenQingchuan easy to resolve, add your extension to https://github.com/vuejs/language-tools/blob/master/extensions/vscode/src/common.ts#L47-L64. Created a pr #4543

@Sunny264
Copy link

image

@matvejs16
Copy link

@johnsoncodehk Can we kindly ask you to check for new reports? There is long time with no updates

@Soviut
Copy link

Soviut commented Oct 30, 2024

@matvejs16 This is a merged commit, you're not going to see any meaningful updates here. They will announce any fixes in releases.

@matvejs16
Copy link

matvejs16 commented Oct 30, 2024

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.

@Soviut I think you are incorrect.

@Soviut
Copy link

Soviut commented Oct 31, 2024

@matvejs16 that doesn't say the maintainers will issue a report, it says that people with problems can report them here and they'll add them to the whitelist. They are not going to publish the whitelist here.

So if you encounter an compatibility issue, you can leave a message saying which package caused the incompatibility, but if all the compatibility issues are solved, then this thread will be very quiet.

@matvejs16
Copy link

Thank you, @Soviut for sharing your perspective. I now better understand the reasoning behind your comments and your position on similar issues.

To clarify my intentions, I raised this concern here because I observed that the extension responsible for compatibility issues had been reported more than four months ago, yet it still hasn’t been added to the whitelist. I understand that sometimes users may inquire without checking the latest updates, but in this case, I made sure to verify that the problem persists before commenting. With several years of programming experience, I approached this thoughtfully, not to hasten the process but to inquire constructively.

Thanks again for your insight!

@Soviut
Copy link

Soviut commented Oct 31, 2024

@matvejs16 okay, that's reasonable. Just report which one you're still seeing and mention its absence from the whitelist.

@uppercaveman
Copy link

image

@leindfraust
Copy link

Is there any updates on https://marketplace.visualstudio.com/items?itemName=MylesMurphy.prettify-ts extension as @said12345plus have commented earlier?

@fschroiff
Copy link

Literally any VSCode window I open I get a message

Hybrid Mode is disabled automatically because there is a potentially incompatible jpoissonnier.vscode-styled-components TypeScript plugin installed.

Not only for vue projects, but for literally any VSCode window I open. And I don't even have that "incompatible plugin" installed...

@pandres95
Copy link

Literally any VSCode window I open I get a message

Hybrid Mode is disabled automatically because there is a potentially incompatible jpoissonnier.vscode-styled-components TypeScript plugin installed.

Not only for vue projects, but for literally any VSCode window I open. And I don't even have that "incompatible plugin" installed...

This 👆

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