Skip to content

Commit 26b6bd1

Browse files
ulrikstridKumar Harsh
authored and
Kumar Harsh
committed
feat(syntax): add support for reason
1 parent 96904e5 commit 26b6bd1

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ VSCode extension for GraphQL schema authoring & consumption.
3434
+ Vue
3535
+ Ruby
3636
+ Cucumber
37+
+ ReasonML/OCaml
3738
+ (Submit a PR to support your language!)
3839

3940
* **Snippets**: Some commonly used snippets are provided which help while writing mutations and queries, such as defining types, interfaces and input types.

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@
114114
"meta.embedded.block.graphql": "graphql"
115115
}
116116
},
117+
{
118+
"injectTo": [
119+
"source.reason",
120+
"source.ocaml"
121+
],
122+
"scopeName": "inline.graphql.re",
123+
"path": "./syntaxes/graphql.re.json",
124+
"embeddedLanguages": {
125+
"meta.embedded.block.graphql": "graphql"
126+
}
127+
},
117128
{
118129
"injectTo": [
119130
"source.ruby"

syntaxes/graphql.re.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"fileTypes": [
3+
"re",
4+
"ml"
5+
],
6+
"injectionSelector": "L:source -string -comment",
7+
"patterns": [
8+
{
9+
"contentName": "meta.embedded.block.graphql",
10+
"begin": "({)(gql)(\\|)",
11+
"end": "(\\|)(\\2)(})",
12+
"patterns": [
13+
{
14+
"include": "source.graphql"
15+
}
16+
]
17+
}
18+
],
19+
"scopeName": "inline.graphql.re"
20+
}

0 commit comments

Comments
 (0)