diff options
Diffstat (limited to 'runtime/queries/gn/highlights.scm')
| -rw-r--r-- | runtime/queries/gn/highlights.scm | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/runtime/queries/gn/highlights.scm b/runtime/queries/gn/highlights.scm new file mode 100644 index 000000000..7bd97ff38 --- /dev/null +++ b/runtime/queries/gn/highlights.scm @@ -0,0 +1,78 @@ +; Includes +"import" @keyword.import + +; Conditionals +[ + "if" + "else" +] @keyword.conditional + +; Repeats +"foreach" @keyword.repeat + +; Operators +[ + "=" + "+=" + "-=" + "!" + "+" + "-" + "<" + "<=" + ">" + ">=" + "==" + "!=" + "&&" + "||" +] @operator + +; Variables +(identifier) @variable + +; Functions +(call_expression + function: (identifier) @function.call) + +; Fields +(scope_access + field: (identifier) @variable.member) + +; Literals +(string) @string + +(escape_sequence) @string.escape + +(expansion) @none + +(integer) @number + +(hex) @string.special + +(boolean) @boolean + +; Punctuation +[ + "{" + "}" + "[" + "]" + "(" + ")" +] @punctuation.bracket + +[ + "." + "," +] @punctuation.delimiter + +(expansion + [ + "$" + "${" + "}" + ] @punctuation.special) + +; Comments +(comment) @comment |
