Skip to content

Commit fce53b5

Browse files
committed
docs: TakeOver Mode
1 parent cd2ff1d commit fce53b5

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h3 align="center">Nuxt Extension Pack</h3>
77

88
<p align="center">
9-
A collection of extensions for working with Nuxt/Vue 3 Framework in VS Code.
9+
A collection of extensions for working with Nuxt/Vue 3 frameworks in VS Code.
1010
</p>
1111

1212
<div align="center">
@@ -30,13 +30,30 @@ Please, refer to each extension's documentation for more information and proper
3030

3131
#### Official Extensions
3232
- [Volar](https://marketplace.visualstudio.com/items?itemName=vue.volar)
33-
- [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=vue.vscode-typescript-vue-plugin)
3433
- [MDC - Markdown Components](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc)
3534

3635
#### Community Extensions
3736
- [Nuxtr](https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode)
3837
- [Goto definition alias](https://marketplace.visualstudio.com/items?itemName=antfu.goto-alias)
38+
<br>
39+
40+
## TypeScript Vue Plugin (Volar)
41+
42+
Previously Volar team introduced [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=vue.vscode-typescript-vue-plugin), A TS server plugin to make TS server know `*.vue` files. This plugin was crucial for ensuring that TypeScript could recognize and work with Vue Single File Components (SFCs) seamlessly. It acted as a bridge between the TypeScript server and Vue files, allowing for proper handling of imports and TypeScript features within Vue SFCs.
43+
44+
However, with the introduction of Volar Takeover Mode, there is a shift in approach. Instead of relying on a separate TypeScript language service instance for Vue files, Volar now consolidates the support for both Vue and TypeScript under a single TypeScript language service instance. This consolidation eliminates the need for a dedicated TypeScript Vue Plugin, simplifying the setup and improving overall performance.
45+
46+
Both of Volar/Nuxt team recommends activating [Volar Takeover Mode](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode) over using TypeScript Vue Plugin.To activate Takeover Mode, follow these steps:
47+
48+
- Launch VSCode command palette with Ctrl + Shift + P (macOS: Cmd + Shift + P).
49+
- Search for `Extensions: Show Built-in Extensions` command.
50+
- Extensions sidebar view will get activated with `@builtin` in search bar. Do not remove it, type `typescript` after it.
51+
- **TypeScript and JavaScript Language Features** should show up as one of the search result. Click on the gear box and choose **Disable (Workspace)**.
52+
- Reload the workspace. Takeover mode should will work properly.
53+
54+
![Volar TakeOver Mode](./media//takeover.png)
3955

56+
More on Takeover Mode and steps [here (Vue.js Official Documentation)](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode).
4057

4158
<br>
4259
<br>

media/takeover.png

194 KB
Loading

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@
3333
"antfu.goto-alias",
3434
"Nuxt.mdc",
3535
"Nuxtr.nuxtr-vscode",
36-
"Vue.volar",
37-
"Vue.vscode-typescript-vue-plugin"
36+
"Vue.volar"
3837
],
3938
"devDependencies": {
4039
"changelogen": "^0.5.5"
4140
}
42-
}
41+
}

0 commit comments

Comments
 (0)