highlights.scm

  1(identifier) @variable
  2
  3(type_identifier) @type
  4(field_identifier) @property
  5(package_identifier) @namespace
  6
  7(keyed_element
  8  .
  9  (literal_element
 10    (identifier) @property))
 11
 12(call_expression
 13  function: (identifier) @function)
 14
 15(call_expression
 16  function: (selector_expression
 17    field: (field_identifier) @function.method))
 18
 19(function_declaration
 20  name: (identifier) @function)
 21
 22(method_declaration
 23  name: (field_identifier) @function.method)
 24(method_elem
 25  name: (field_identifier) @function.method)
 26
 27[
 28  ";"
 29  "."
 30  ","
 31  ":"
 32] @punctuation.delimiter
 33
 34[
 35  "("
 36  ")"
 37  "{"
 38  "}"
 39  "["
 40  "]"
 41] @punctuation.bracket
 42
 43[
 44  "--"
 45  "-"
 46  "-="
 47  ":="
 48  "!"
 49  "!="
 50  "..."
 51  "*"
 52  "*"
 53  "*="
 54  "/"
 55  "/="
 56  "&"
 57  "&&"
 58  "&="
 59  "%"
 60  "%="
 61  "^"
 62  "^="
 63  "+"
 64  "++"
 65  "+="
 66  "<-"
 67  "<"
 68  "<<"
 69  "<<="
 70  "<="
 71  "="
 72  "=="
 73  ">"
 74  ">="
 75  ">>"
 76  ">>="
 77  "|"
 78  "|="
 79  "||"
 80  "~"
 81] @operator
 82
 83[
 84  "break"
 85  "case"
 86  "chan"
 87  "const"
 88  "continue"
 89  "default"
 90  "defer"
 91  "else"
 92  "fallthrough"
 93  "for"
 94  "func"
 95  "go"
 96  "goto"
 97  "if"
 98  "import"
 99  "interface"
100  "map"
101  "package"
102  "range"
103  "return"
104  "select"
105  "struct"
106  "switch"
107  "type"
108  "var"
109] @keyword
110
111[
112  (interpreted_string_literal)
113  (raw_string_literal)
114  (rune_literal)
115] @string
116
117(escape_sequence) @string.escape
118
119[
120  (int_literal)
121  (float_literal)
122  (imaginary_literal)
123] @number
124
125(const_spec
126  name: (identifier) @constant)
127
128[
129  (true)
130  (false)
131] @boolean
132
133[
134  (nil)
135  (iota)
136] @constant.builtin
137
138(comment) @comment