highlights.scm

  1(identifier) @variable
  2(field_identifier) @property
  3(namespace_identifier) @namespace
  4
  5(call_expression
  6  function: (qualified_identifier
  7    name: (identifier) @function))
  8
  9(call_expression
 10  (qualified_identifier
 11    (identifier) @function.call))
 12
 13(call_expression
 14  (qualified_identifier
 15    (qualified_identifier
 16      (identifier) @function.call)))
 17
 18(call_expression
 19  (qualified_identifier
 20    (qualified_identifier
 21      (qualified_identifier
 22        (identifier) @function.call))))
 23
 24((qualified_identifier
 25  (qualified_identifier
 26    (qualified_identifier
 27      (qualified_identifier
 28        (identifier) @function.call)))) @_parent
 29  (#has-ancestor? @_parent call_expression))
 30
 31(call_expression
 32  function: (identifier) @function)
 33
 34(call_expression
 35  function: (field_expression
 36    field: (field_identifier) @function))
 37
 38(preproc_function_def
 39  name: (identifier) @function.special)
 40
 41(template_function
 42  name: (identifier) @function)
 43
 44(template_method
 45  name: (field_identifier) @function)
 46
 47(function_declarator
 48  declarator: (identifier) @function)
 49
 50(function_declarator
 51  declarator: (qualified_identifier
 52    name: (identifier) @function))
 53
 54(function_declarator
 55  declarator: (field_identifier) @function)
 56
 57(operator_name
 58  (identifier)? @operator) @function
 59
 60(destructor_name (identifier) @function)
 61
 62((namespace_identifier) @type
 63 (#match? @type "^[A-Z]"))
 64
 65(auto) @type
 66(type_identifier) @type
 67
 68((identifier) @constant
 69 (#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
 70
 71(statement_identifier) @label
 72(this) @variable.special
 73("static_assert") @function.builtin
 74
 75[
 76  "alignas"
 77  "alignof"
 78  "break"
 79  "case"
 80  "catch"
 81  "class"
 82  "co_await"
 83  "co_return"
 84  "co_yield"
 85  "concept"
 86  "constexpr"
 87  "continue"
 88  "decltype"
 89  "default"
 90  "delete"
 91  "do"
 92  "else"
 93  "enum"
 94  "explicit"
 95  "extern"
 96  "final"
 97  "for"
 98  "friend"
 99  "if"
100  "inline"
101  "namespace"
102  "new"
103  "noexcept"
104  "override"
105  "private"
106  "protected"
107  "public"
108  "requires"
109  "return"
110  "sizeof"
111  "struct"
112  "switch"
113  "template"
114  "throw"
115  "try"
116  "typedef"
117  "typename"
118  "union"
119  "using"
120  "virtual"
121  "while"
122  (primitive_type)
123  (sized_type_specifier)
124  (storage_class_specifier)
125  (type_qualifier)
126] @keyword
127
128[
129  "#define"
130  "#elif"
131  "#else"
132  "#endif"
133  "#if"
134  "#ifdef"
135  "#ifndef"
136  "#include"
137  (preproc_directive)
138] @keyword
139
140(comment) @comment
141
142[
143  (true)
144  (false)
145  (null)
146  ("nullptr")
147] @constant
148
149(number_literal) @number
150
151[
152  (string_literal)
153  (system_lib_string)
154  (char_literal)
155  (raw_string_literal)
156] @string
157
158[
159  ","
160  ":"
161  "::"
162  ";"
163  (raw_string_delimiter)
164] @punctuation.delimiter
165
166[
167  "{"
168  "}"
169  "("
170  ")"
171  "["
172  "]"
173] @punctuation.bracket
174
175[
176  "."
177  ".*"
178  "->*"
179  "~"
180  "-"
181  "--"
182  "-="
183  "->"
184  "="
185  "!"
186  "!="
187  "|"
188  "|="
189  "||"
190  "^"
191  "^="
192  "&"
193  "&="
194  "&&"
195  "+"
196  "++"
197  "+="
198  "*"
199  "*="
200  "/"
201  "/="
202  "%"
203  "%="
204  "<<"
205  "<<="
206  ">>"
207  ">>="
208  "<"
209  "=="
210  ">"
211  "<="
212  ">="
213  "<=>"
214  "||"
215  "?"
216] @operator
217
218(conditional_expression ":" @operator)
219(user_defined_literal (literal_suffix) @operator)