Skip to content

Commit dddc0db

Browse files
committed
feat: support syntax highlight for style variable injection
vuejs/rfcs#231
1 parent 3c5976c commit dddc0db

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

extensions/vscode-vue-language-features/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@
139139
},
140140
{
141141
"id": "vue-interpolations"
142+
},
143+
{
144+
"id": "vue-sfc-style-variable-injection"
142145
}
143146
],
144147
"grammars": [
@@ -221,6 +224,14 @@
221224
"text.html.derivative",
222225
"text.pug"
223226
]
227+
},
228+
{
229+
"language": "vue-sfc-style-variable-injection",
230+
"scopeName": "vue.sfc.style.variable.injection",
231+
"path": "./syntaxes/vue-sfc-style-variable-injection.json",
232+
"injectTo": [
233+
"source.vue"
234+
]
224235
}
225236
],
226237
"breakpoints": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"fileTypes": [],
3+
"injectionSelector": "L:meta.property-value.css",
4+
"patterns": [
5+
{
6+
"include": "#vue-sfc-style-variable-injection"
7+
}
8+
],
9+
"repository": {
10+
"vue-sfc-style-variable-injection": {
11+
"begin": "\\b(v-bind)\\s*\\(",
12+
"name": "vue.sfc.style.variable.injection.v-bind",
13+
"end": "\\)",
14+
"beginCaptures": {
15+
"1": {
16+
"name": "entity.name.function"
17+
}
18+
},
19+
"patterns": [
20+
{
21+
"begin": "('|\")",
22+
"beginCaptures": {
23+
"1": {
24+
"name": "punctuation.definition.tag.begin.html"
25+
}
26+
},
27+
"end": "(\\1)",
28+
"endCaptures": {
29+
"1": {
30+
"name": "punctuation.definition.tag.end.html"
31+
}
32+
},
33+
"name": "source.ts.embedded.html.vue",
34+
"patterns": [
35+
{
36+
"include": "source.js"
37+
}
38+
]
39+
},
40+
{
41+
"include": "source.js"
42+
}
43+
]
44+
}
45+
},
46+
"scopeName": "vue.sfc.style.variable.injection"
47+
}

0 commit comments

Comments
 (0)