-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Graphql language support * Fix docs gen * Add JS Graphql injection query * Updates based on PR feedback Co-authored-by: Blaž Hrastnik <[email protected]>
- Loading branch information
Showing
6 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule tree-sitter-graphql
added at
5e66e9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
; Types | ||
;------ | ||
|
||
(scalar_type_definition | ||
(name) @type) | ||
|
||
(object_type_definition | ||
(name) @type) | ||
|
||
(interface_type_definition | ||
(name) @type) | ||
|
||
(union_type_definition | ||
(name) @type) | ||
|
||
(enum_type_definition | ||
(name) @type) | ||
|
||
(input_object_type_definition | ||
(name) @type) | ||
|
||
(directive_definition | ||
(name) @type) | ||
|
||
(directive_definition | ||
"@" @type) | ||
|
||
(scalar_type_extension | ||
(name) @type) | ||
|
||
(object_type_extension | ||
(name) @type) | ||
|
||
(interface_type_extension | ||
(name) @type) | ||
|
||
(union_type_extension | ||
(name) @type) | ||
|
||
(enum_type_extension | ||
(name) @type) | ||
|
||
(input_object_type_extension | ||
(name) @type) | ||
|
||
(named_type | ||
(name) @type) | ||
|
||
(directive) @type | ||
|
||
; Properties | ||
;----------- | ||
|
||
(field | ||
(name) @variable.other.member) | ||
|
||
(field | ||
(alias | ||
(name) @variable.other.member)) | ||
|
||
(field_definition | ||
(name) @variable.other.member) | ||
|
||
(object_value | ||
(object_field | ||
(name) @variable.other.member)) | ||
|
||
(enum_value | ||
(name) @variable.other.member) | ||
|
||
; Variable Definitions and Arguments | ||
;----------------------------------- | ||
|
||
(operation_definition | ||
(name) @variable) | ||
|
||
(fragment_name | ||
(name) @variable) | ||
|
||
(input_fields_definition | ||
(input_value_definition | ||
(name) @variable.parameter)) | ||
|
||
(argument | ||
(name) @variable.parameter) | ||
|
||
(arguments_definition | ||
(input_value_definition | ||
(name) @variable.parameter)) | ||
|
||
(variable_definition | ||
(variable) @variable.parameter) | ||
|
||
(argument | ||
(value | ||
(variable) @variable)) | ||
|
||
; Constants | ||
;---------- | ||
|
||
(string_value) @string | ||
|
||
(int_value) @constants.numeric.integer | ||
|
||
(float_value) @constants.numeric.float | ||
|
||
(boolean_value) @constants.builtin.boolean | ||
|
||
; Literals | ||
;--------- | ||
|
||
(description) @comment | ||
|
||
(comment) @comment | ||
|
||
(directive_location | ||
(executable_directive_location) @type.builtin) | ||
|
||
(directive_location | ||
(type_system_directive_location) @type.builtin) | ||
|
||
; Keywords | ||
;---------- | ||
|
||
[ | ||
"query" | ||
"mutation" | ||
"subscription" | ||
"fragment" | ||
"scalar" | ||
"type" | ||
"interface" | ||
"union" | ||
"enum" | ||
"input" | ||
"extend" | ||
"directive" | ||
"schema" | ||
"on" | ||
"repeatable" | ||
"implements" | ||
] @keyword | ||
|
||
; Punctuation | ||
;------------ | ||
|
||
[ | ||
"(" | ||
")" | ||
"[" | ||
"]" | ||
"{" | ||
"}" | ||
] @punctuation.bracket | ||
|
||
"=" @operator | ||
|
||
"|" @punctuation.delimiter | ||
"&" @punctuation.delimiter | ||
":" @punctuation.delimiter | ||
|
||
"..." @punctuation.special | ||
"!" @punctuation.special |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters