Skip to content

Commit

Permalink
fix(syntax): designate graphql blocks in feature files
Browse files Browse the repository at this point in the history
now you can
- jump and select to brackets and expand bracket
  selections in feature files
- comment blocks using the usual vscode shortcuts
  • Loading branch information
Kumar Harsh committed Jun 5, 2019
1 parent 654dd91 commit 836149a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@
"text.gherkin.feature"
],
"scopeName": "text.gherkin.feature.graphql",
"path": "./syntaxes/graphql.feature.json"
"path": "./syntaxes/graphql.feature.json",
"embeddedLanguages": {
"meta.embedded.block.graphql": "graphql"
}
},
{
"injectTo": [
Expand Down
2 changes: 2 additions & 0 deletions syntaxes/graphql.feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"injectionSelector": "L:text -comment",
"patterns": [
{
"contentName": "meta.embedded.block.graphql",
"begin": "graphql request\\s*$",
"end": "(?<=\"\"\")",
"patterns": [
Expand All @@ -23,6 +24,7 @@
]
},
{
"contentName": "meta.embedded.block.graphql",
"begin": "^\\s*(\"\"\")\\s*(#graphql)\\s*$",
"beginCaptures": {
"1": { "name": "string.quoted.double.graphql.begin" },
Expand Down

0 comments on commit 836149a

Please sign in to comment.