Use Take Over Mode instead of TS Plugin #471
Replies: 30 comments 56 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? |
|
Hi @johnsoncodehk , is the vue language server going to provide intellisense and type check for |
|
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 |
|
I've done the following steps:
But the message keeps popping up and I have no intellisense in .ts files. |
|
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?
|
Recommanded steps to have
|
|
Hii @johnsoncodehk Hii, can we activate volar language features by opening a TS file when using take-over mode ? Is this possible to implement ? |
|
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? |
|
FYI, I just found another difference between Take Over Mode and
|
|
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 |
|
Is there a way to disable the popup telling "Take Over Mode enabled." It is really annoying. Thanks! |
|
when i type /**
*/
function x(){
}instead of /**
*
*/
function x(){
}How to fix it ? |
|
If I switch between vue project and non-vue project, do I need turn on/off Take Over Mode over and over again? |
|
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. |
|
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 |
|
can if not use take over mode, the reference count in ts/js ignore the references in .vue file . |
|
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. |
|
Hello there, can any body do a simple video doing the steps of these config please? I'd appreciate it |
|
@johnsoncodehk is this something that is recommended by Volar? |
|
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. |
|
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. |
|
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.. |
|
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 |
|
Can someone please explain what I have to do if I'm using Neovim and not VSCode? I'm using |
|
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. |
|
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.) |
|
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. :( |
|
Is anyone having issues with the setting, Editor: Occurrences Highlight, not working in .vue files? "Take Over Mode" is not an option any more but having the "Vue - Official" extension doesn't seem to allow that setting on its own. Note, that this setting works in my .ts files just not for .vue files. |
|
Hi there, I was creating a TS plugin following https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin . It's meant to add some more autocomplete options in an internal tool we have. It's working totally fine in VsCode but in IntelliJ is not working at all. Only way I made it work is by going to Language & Frameworks > Typescript > Vue and disable or use classic Typescript Service. So it seems Vue Language Server in take over mode is not really picking up my plugin. Is this expected behavior? Is there a way to fix it? If there's no way around it, is there a way to create a plugin for Vue Language Server? I was not able to find any documentation or tutorial about it. Thanks in advance for the help! |










Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 Extensionscommand2.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 ExtensionscommandTypeScript 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)All reactions