-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathGraphQL.js.sublime-syntax
More file actions
39 lines (39 loc) · 1.16 KB
/
GraphQL.js.sublime-syntax
File metadata and controls
39 lines (39 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- js
- jsx
- ts
- tsx
- vue
- svelte
scope: inline.graphql
contexts:
main:
- match: \s*+(?:(?:(Relay)\??\.)(QL)|(gql|graphql|graphql\.experimental)|(/\* GraphQL \*/))\s*(`)
captures:
1: variable.other.class.js
2: entity.name.function.tagged-template.js
3: entity.name.function.tagged-template.js
4: comment.graphql.js
5: punctuation.definition.string.template.begin.js
push:
- meta_content_scope: meta.embedded.block.graphql
- match: '`'
captures:
0: punctuation.definition.string.template.end.js
pop: true
- include: scope:source.graphql
- match: (`)(#graphql)
captures:
1: punctuation.definition.string.template.begin.js
2: comment.line.graphql.js
push:
- meta_scope: taggedTemplates
- meta_content_scope: meta.embedded.block.graphql
- match: '`'
captures:
0: punctuation.definition.string.template.end.js
pop: true
- include: scope:source.graphql