Use Take Over Mode instead of TS Plugin #471
Replies: 28 comments 55 replies
-
Evan recently said during the Nuxt Nation Q&A that the reason takeover mode and vue-tsc exists because the TypeScript plugin API is not flexible enough. In what ways are TS plugins insufficient? Is this about difficulty parsing files that don't have the .ts/.js extension - so .vue files (obviously)? Rahul mentions it here https://twitter.com/3nuc1/status/1306642521938890754 Are there any issues in the TypeScript repo one could follow regarding this? |
Beta Was this translation helpful? Give feedback.
-
Hi @johnsoncodehk , is the vue language server going to provide intellisense and type check for |
Beta Was this translation helpful? Give feedback.
-
I have read this multiple times and still don't understand what is the recommended way. As far as I understand Volar, VueDx and builtin Typescript support they all offer typescript and potentially do duplicate work. Volar by default disables this feature, is it because it's not as good as others? Then we have VueDx and builtin Typescript support (TypeScript and JavaScript Language Features) duplicating each other. Which one shall we enable to have most smoothest operation for Volar? In short, what is the recommended setup for Volar? @johnsoncodehk and Rahul have done amazing work on this project and Vuedx and I feel I am wasting that effort because I am not configuring Volar and Vuedx properly. some setup recommendations for Vue3 (With Vite) would be very appreciated Thanks |
Beta Was this translation helpful? Give feedback.
-
I've done the following steps:
But the message keeps popping up and I have no intellisense in .ts files. |
Beta Was this translation helpful? Give feedback.
-
One more thing @johnsoncodehk the popup is contradicting and confusing: as i understand from this page, installing typescript vue plugin is part of enabling the take over mode. But the message in pop up says use either plugin or take over mode and what I read there is "use take over mode instead of typescript vue plugin". Is this what it meant to say?
|
Beta Was this translation helpful? Give feedback.
-
Recommanded steps to have
|
Beta Was this translation helpful? Give feedback.
-
Hii @johnsoncodehk Hii, can we activate volar language features by opening a TS file when using take-over mode ? Is this possible to implement ? |
Beta Was this translation helpful? Give feedback.
-
Can you please clarify (add it above): Does this mean to enable take over mode, we should not install the Or we should install both? |
Beta Was this translation helpful? Give feedback.
-
FYI, I just found another difference between Take Over Mode and
|
Beta Was this translation helpful? Give feedback.
-
It seems Volar Take Over mode can't be used with Yarn 3 PnP, as it takes over the workspace typescript, and .yarn packages stop being recognized, as Volar doesn't use |
Beta Was this translation helpful? Give feedback.
-
Is there a way to disable the popup telling "Take Over Mode enabled." It is really annoying. Thanks! |
Beta Was this translation helpful? Give feedback.
-
when i type /**
*/
function x(){
} instead of /**
*
*/
function x(){
} How to fix it ? |
Beta Was this translation helpful? Give feedback.
-
If I switch between vue project and non-vue project, do I need turn on/off Take Over Mode over and over again? |
Beta Was this translation helpful? Give feedback.
-
i was using takes over mode since long time and love it so far but inside one of my project i have cloud function in Deno and vs code Deno need, typescript been enable so i can't anymore. |
Beta Was this translation helpful? Give feedback.
-
Can let the plug-in prompt disappear automatically in a few seconds? Every open vscode hint, but will not disappear automatically, I feel very annoying,As a developer I know how to do it directly, do not need to be kept |
Beta Was this translation helpful? Give feedback.
-
can
if not use take over mode, the reference count in ts/js ignore the references in .vue file . |
Beta Was this translation helpful? Give feedback.
-
Take Over Mode is not compatible with SonarLint VSCode plugin which has a dependency on the built-in When disabling
The TypeScript Vue Plugin (Volar) is a better option for those who are using SonarLint. |
Beta Was this translation helpful? Give feedback.
-
Hello there, can any body do a simple video doing the steps of these config please? I'd appreciate it |
Beta Was this translation helpful? Give feedback.
-
Did all the steps several times, but this keeps appearing. What can I do? |
Beta Was this translation helpful? Give feedback.
-
@johnsoncodehk is this something that is recommended by Volar? |
Beta Was this translation helpful? Give feedback.
-
If you have manual set ts files to Typescript, VS Code might default to plain text. In that case, click on “plain text” in the bottom right corner and select detect automatically. |
Beta Was this translation helpful? Give feedback.
-
front-end world is crazy, too many inventors, learning something, when you feel enough, it's old and replaced. I miss the era that dealing with html + css + js only. |
Beta Was this translation helpful? Give feedback.
-
Hey there! I am using VSCode with And intellisense is complaining about TS errors that my colleagues with jetbrains don't have. Some examples:
We have the same tsconfig files, with the same TS version. I also tried different volar versions, enabling take over mode, etc etc... It's sad because I really like vscode but finally I'll have to switch to jetbrains.. |
Beta Was this translation helpful? Give feedback.
-
Do someone know if we can setup takeover mode project wise? Right now we have to make each people in the team do the takeover, i would like to have it set in |
Beta Was this translation helpful? Give feedback.
-
Can someone please explain what I have to do if I'm using Neovim and not VSCode? I'm using |
Beta Was this translation helpful? Give feedback.
-
does anyone know how to enable Takeover mode with JetBrains IDEs, e.g. WebStorm/PhpStorm? There's an option to use Volar (@vue/language-service), but I can't find Takeover mode toggle anywhere. Maybe it's running by default? I thought it isn't because it's way slower than VSCode on Takeover mode. |
Beta Was this translation helpful? Give feedback.
-
The (updated) initial post here reports that the original content is outdated, and points to https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode as the latest documentation. However, the linked section was removed three weeks ago, as part of vuejs/docs#2726 in response to the TypeScript Vue Plugin being deprecated here. Does that mean these instructions are no longer needed at all? Should this be closed? (It's still linked to from various places, for example Fedora's website repo.) |
Beta Was this translation helpful? Give feedback.
-
If someone, anyone please, could link to what config is suposed to be used now that would be a life saver. I have Vue components and ts files for pinia that cannot see each other in go to definition and go to referance. :( |
Beta Was this translation helpful? Give feedback.
-
Note
Some content of this post is outdated, please check official document instead of this post.
👉 https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode
Original content
What is Take Over Mode?
In the past, we have explored a variety of language support modes for TS and Vue, namely:
Vetur Mode: Vue + TS language support provided by different extensions.
VueDX Mode: Realized by TS Plugin, Vue + TS language support also provided by VSCode built-in TypeScript extension.
Volar Mode: Similar to Vetur, but use TS Plugin to patching TS language support additional.
How to enable Take Over Mode?
2.1. Run
Extensions: Show Built-in Extensions
command2.2. Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
and then open any vue file to trigger Volar activation(no longer need in 0.28.4).How to disable Take Over Mode?
Extensions: Show Built-in Extensions
commandTypeScript and JavaScript Language Features
, right click and selectEnable (Workspace)
What are the limitations of Take Over Mode?
For example,
Vue language server does not support tsconfig.json properties intellisense(supported 0.30.3),and the experimental feature Inlay hints(supported 0.34.8).Volar has known performance issues with monorepo support. If your TS project is monorepo, language support in *.ts may be slower than before. (Fully support for monorepo #348)Beta Was this translation helpful? Give feedback.
All reactions