highlights.scm

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