Skip to content

Commit 836149a

Browse files
author
Kumar Harsh
committed
fix(syntax): designate graphql blocks in feature files
now you can - jump and select to brackets and expand bracket selections in feature files - comment blocks using the usual vscode shortcuts
1 parent 654dd91 commit 836149a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@
130130
"text.gherkin.feature"
131131
],
132132
"scopeName": "text.gherkin.feature.graphql",
133-
"path": "./syntaxes/graphql.feature.json"
133+
"path": "./syntaxes/graphql.feature.json",
134+
"embeddedLanguages": {
135+
"meta.embedded.block.graphql": "graphql"
136+
}
134137
},
135138
{
136139
"injectTo": [

syntaxes/graphql.feature.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"injectionSelector": "L:text -comment",
55
"patterns": [
66
{
7+
"contentName": "meta.embedded.block.graphql",
78
"begin": "graphql request\\s*$",
89
"end": "(?<=\"\"\")",
910
"patterns": [
@@ -23,6 +24,7 @@
2324
]
2425
},
2526
{
27+
"contentName": "meta.embedded.block.graphql",
2628
"begin": "^\\s*(\"\"\")\\s*(#graphql)\\s*$",
2729
"beginCaptures": {
2830
"1": { "name": "string.quoted.double.graphql.begin" },

0 commit comments

Comments
 (0)