mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
%YAML 1.2
|
|
---
|
|
name: GraphQL
|
|
file_extensions:
|
|
- graphql
|
|
- gql
|
|
scope: source.graphql
|
|
contexts:
|
|
main:
|
|
- include: comments
|
|
- include: strings
|
|
- include: numbers
|
|
- match: '\b(type|interface|union|enum|input|schema|query|mutation|subscription|scalar|extend|implements|fragment|on)\b'
|
|
scope: keyword.declaration.graphql
|
|
- match: '\b(true|false|null)\b'
|
|
scope: constant.language.graphql
|
|
- match: '\$[A-Za-z_][A-Za-z0-9_]*'
|
|
scope: variable.parameter.graphql
|
|
- match: '@[A-Za-z_][A-Za-z0-9_]*'
|
|
scope: entity.other.attribute-name.directive.graphql
|
|
- match: '[A-Za-z_][A-Za-z0-9_]*'
|
|
scope: entity.name.type.graphql
|
|
|
|
comments:
|
|
- match: '#.*$'
|
|
scope: comment.line.number-sign.graphql
|
|
|
|
strings:
|
|
- match: '"""'
|
|
scope: punctuation.definition.string.begin.graphql
|
|
push:
|
|
- meta_scope: string.quoted.triple.graphql
|
|
- match: '"""'
|
|
scope: punctuation.definition.string.end.graphql
|
|
pop: true
|
|
- match: '"'
|
|
scope: punctuation.definition.string.begin.graphql
|
|
push:
|
|
- meta_scope: string.quoted.double.graphql
|
|
- match: '"'
|
|
scope: punctuation.definition.string.end.graphql
|
|
pop: true
|
|
- match: '\\.'
|
|
scope: constant.character.escape.graphql
|
|
|
|
numbers:
|
|
- match: '(?:\b-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)'
|
|
scope: constant.numeric.graphql
|