Skip to content

Commit

Permalink
feat: support syntax highlight for style variable injection
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed May 28, 2022
1 parent 3c5976c commit dddc0db
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extensions/vscode-vue-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
},
{
"id": "vue-interpolations"
},
{
"id": "vue-sfc-style-variable-injection"
}
],
"grammars": [
Expand Down Expand Up @@ -221,6 +224,14 @@
"text.html.derivative",
"text.pug"
]
},
{
"language": "vue-sfc-style-variable-injection",
"scopeName": "vue.sfc.style.variable.injection",
"path": "./syntaxes/vue-sfc-style-variable-injection.json",
"injectTo": [
"source.vue"
]
}
],
"breakpoints": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"fileTypes": [],
"injectionSelector": "L:meta.property-value.css",
"patterns": [
{
"include": "#vue-sfc-style-variable-injection"
}
],
"repository": {
"vue-sfc-style-variable-injection": {
"begin": "\\b(v-bind)\\s*\\(",
"name": "vue.sfc.style.variable.injection.v-bind",
"end": "\\)",
"beginCaptures": {
"1": {
"name": "entity.name.function"
}
},
"patterns": [
{
"begin": "('|\")",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
}
},
"end": "(\\1)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
}
},
"name": "source.ts.embedded.html.vue",
"patterns": [
{
"include": "source.js"
}
]
},
{
"include": "source.js"
}
]
}
},
"scopeName": "vue.sfc.style.variable.injection"
}

0 comments on commit dddc0db

Please sign in to comment.