You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
-`vls` now only supports Node `>=10`, as Prettier 2.0 drops support for Node 8.
6
6
- Upgrade to prettier 2.0. #1925 and #1794.
7
7
- Add [prettier/plugin-pug](https://github.com/prettier/plugin-pug) as default formatter for `pug`. #527.
8
+
- 🙌 Cusom tags IntelliSense for local `tags.json`/`attributes.json`. [Usage Docs](https://vuejs.github.io/vetur/framework.html#workspace-custom-tags). Thanks to contribution from [Carlos Rodrigues](https://github.com/pikax). #1364 and #2018.
8
9
- 🙌 Detect tags from @nuxt/components. Thanks to contribution from [pooya parsa](https://github.com/pi0). #1921.
9
10
- 🙌 Fix VTI crash by passing correct PID to language server. Thanks to contribution from [Daniil Yastremskiy](@TheBeastOfCaerbannog). #1699 and #1805.
10
11
- 🙌 Fix template interpolation hover info of v-for readonly array item. Thanks to contribution from [@yoyo930021](https://github.com/yoyo930021). #1788.
Copy file name to clipboardExpand all lines: docs/framework.md
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Framework Support
2
2
3
-
Vue frameworks can define custom components used in `<template>` region. For example, `vue-router` provides `<router-link>` component that could have attributes such as `to` and `replace`. Vetur currently provides autocomplete support for the component names and attributes.
3
+
Vue libraries or frameworks can define custom components used in `<template>` region. For example, [`vue-router`](https://router.vuejs.org/) provides [`<router-link>`](https://router.vuejs.org/api/#router-link) component that could have attributes such as `to` and `replace`. Vetur currently provides autocomplete support for the component names and attributes.
4
4
5
5
Vetur currently provides framework support for the following vue libraries:
6
6
@@ -14,6 +14,8 @@ Vetur currently provides framework support for the following vue libraries:
14
14
-[Quasar Framework](https://quasar.dev/)
15
15
-[Gridsome](https://gridsome.org/)
16
16
17
+
🚧 The data format is not specified yet. 🚧
18
+
17
19
## Usage
18
20
19
21
Vetur reads the `package.json`**in your project root** to determine if it should offer tags & attributes completions. Here are the exact dependencies and sources of their definitions.
@@ -48,6 +50,26 @@ If a package listed in `dependencies` has a `vetur` key, then Vetur will try to
48
50
49
51
By bundling the tags / attributes definitions together with the framework library, you ensure that users will always get the matching tags / attributes with the specific version of your library they are using.
50
52
53
+
## Workspace Custom Tags
54
+
55
+
You can define custom tags/attributes for your workspace by specifying a `vetur` key in package.json. For example, to get auto completion for tag `<foo-tag>`, all you need to do is:
56
+
57
+
- Create a file `tags.json` with:
58
+
59
+
```json
60
+
{ "foo-bar": { "description": "A foo tag" } }
61
+
```
62
+
63
+
- Add this line to `package.json`:
64
+
65
+
```json
66
+
{
67
+
"vetur": { "tags": "./tags.json" }
68
+
}
69
+
```
70
+
71
+
- Reload VS Code. You'll get `foo-bar` when completing `<|`.
72
+
51
73
## Adding a Framework
52
74
53
75
If your Vue UI framework has a lot of users, we might consider bundling its support in Vetur. However, this means Vetur's definition for the framework might become outdated.
0 commit comments