%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