on b4e795d help sign in
helix/runtime/queries/cpp/highlights.scm
115 lines 1.8 kB history raw
1; Functions
3(call_expression
4 function: (qualified_identifier
5 name: (identifier) @function))
7(template_function
8 name: (identifier) @function)
10(template_method
11 name: (field_identifier) @function)
13(function_declarator
14 declarator: (qualified_identifier
15 name: (identifier) @function))
17(function_declarator
18 declarator: (qualified_identifier
19 name: (qualified_identifier
20 name: (identifier) @function)))
22(function_declarator
23 declarator: (field_identifier) @function)
25; Types
27(using_declaration ("using" "namespace" (identifier) @namespace))
28(using_declaration ("using" "namespace" (qualified_identifier name: (identifier) @namespace)))
29(namespace_definition name: (identifier) @namespace)
30(namespace_identifier) @namespace
32(qualified_identifier name: (identifier) @type.enum.variant)
34(auto) @type
35"decltype" @type
37; Constants
39(this) @variable.builtin
40(nullptr) @constant.builtin
42; Keywords
44(template_argument_list (["<" ">"] @punctuation.bracket))
45(template_parameter_list (["<" ">"] @punctuation.bracket))
46(default_method_clause "default" @keyword)
48"static_assert" @function.special
51 "<=>"
52 "[]"
53 "()"
54] @operator
57 "co_await"
58 "co_return"
59 "co_yield"
60 "concept"
61 "delete"
62 "final"
63 "new"
64 "operator"
65 "requires"
66 "using"
67] @keyword
70 "catch"
71 "noexcept"
72 "throw"
73 "try"
74] @keyword.control.exception
78 "and"
79 "and_eq"
80 "bitor"
81 "bitand"
82 "not"
83 "not_eq"
84 "or"
85 "or_eq"
86 "xor"
87 "xor_eq"
88] @keyword.operator
91 "class"
92 "namespace"
93 "typename"
94] @keyword.storage.type
97 "constexpr"
98 "constinit"
99 "consteval"
100 "explicit"
101 "friend"
102 "mutable"
103 "private"
104 "protected"
105 "public"
106 "override"
107 "template"
108 "virtual"
109] @keyword.storage.modifier
111; Strings
113(raw_string_literal) @string
115; inherits: c