highlights.scm

  1(identifier) @variable
  2
  3(call_expression
  4  function: (qualified_identifier
  5    name: (identifier) @function))
  6
  7(call_expression
  8  function: (identifier) @function)
  9
 10(call_expression
 11  function: (field_expression
 12    field: (field_identifier) @function))
 13
 14(preproc_function_def
 15  name: (identifier) @function.special)
 16
 17(template_function
 18  name: (identifier) @function)
 19
 20(template_method
 21  name: (field_identifier) @function)
 22
 23(function_declarator
 24  declarator: (identifier) @function)
 25
 26(function_declarator
 27  declarator: (qualified_identifier
 28    name: (identifier) @function))
 29
 30(function_declarator
 31  declarator: (field_identifier) @function)
 32
 33((namespace_identifier) @type
 34 (#match? @type "^[A-Z]"))
 35
 36(auto) @type
 37(type_identifier) @type
 38
 39((identifier) @constant
 40 (#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
 41
 42(field_identifier) @property
 43(statement_identifier) @label
 44(this) @variable.special
 45
 46[
 47  "break"
 48  "case"
 49  "catch"
 50  "class"
 51  "co_await"
 52  "co_return"
 53  "co_yield"
 54  "const"
 55  "constexpr"
 56  "continue"
 57  "default"
 58  "delete"
 59  "do"
 60  "else"
 61  "enum"
 62  "explicit"
 63  "extern"
 64  "final"
 65  "for"
 66  "friend"
 67  "if"
 68  "if"
 69  "inline"
 70  "mutable"
 71  "namespace"
 72  "new"
 73  "noexcept"
 74  "override"
 75  "private"
 76  "protected"
 77  "public"
 78  "return"
 79  "sizeof"
 80  "static"
 81  "struct"
 82  "switch"
 83  "template"
 84  "throw"
 85  "try"
 86  "typedef"
 87  "typename"
 88  "union"
 89  "using"
 90  "virtual"
 91  "volatile"
 92  "while"
 93  (primitive_type)
 94  (type_qualifier)
 95] @keyword
 96
 97[
 98  "#define"
 99  "#elif"
100  "#else"
101  "#endif"
102  "#if"
103  "#ifdef"
104  "#ifndef"
105  "#include"
106  (preproc_directive)
107] @keyword
108
109(comment) @comment
110
111[
112  (true)
113  (false)
114  (null)
115  ("nullptr")
116] @constant
117
118(number_literal) @number
119
120[
121  (string_literal)
122  (system_lib_string)
123  (char_literal)
124  (raw_string_literal)
125] @string
126
127[
128  "."
129  ";"
130] @punctuation.delimiter
131
132[
133  "{"
134  "}"
135  "("
136  ")"
137  "["
138  "]"
139] @punctuation.bracket
140
141[
142  "--"
143  "-"
144  "-="
145  "->"
146  "="
147  "!="
148  "*"
149  "&"
150  "&&"
151  "+"
152  "++"
153  "+="
154  "<"
155  "=="
156  ">"
157  "||"
158] @operator