Debian Codegraph @

runtime/queries/slint/highlights.scm

raw symbols SCIP
1 (comment) @comment
2
3 ; Different types:
4 (string_value) @string
5 (bool_value) @constant.builtin.boolean
6
7 ; Constants
8
9 (escape_sequence) @constant.character.escape
10
11 (color_value) @constant
12
13 [
14 (children_identifier)
15 (easing_kind_identifier)
16 ] @constant.builtin
17
18 [
19 (int_value)
20 (physical_length_value)
21 ] @constant.numeric.integer
22
23 [
24 (float_value)
25 (percent_value)
26 (length_value)
27 (duration_value)
28 (angle_value)
29 (relative_font_size_value)
30 ] @constant.numeric.float
31
32 (purity) @keyword.storage.modifier
33
34 (function_visibility) @keyword.storage.modifier
35
36 (property_visibility) @keyword.storage.modifier
37
38 (builtin_type_identifier) @type.builtin
39
40 (reference_identifier) @variable.builtin
41
42 (type
43 [
44 (type_list)
45 (user_type_identifier)
46 (anon_struct_block)
47 ]) @type
48
49 (user_type_identifier) @type
50
51 ; Functions and callbacks
52 (argument) @variable.parameter
53
54 (function_call
55 name: (_) @function)
56
57 ; definitions
58 (callback
59 name: (_) @function)
60
61 (callback_alias
62 name: (_) @function)
63
64 (callback_event
65 name: (simple_identifier) @function)
66
67 (enum_definition
68 name: (_) @type.enum)
69
70 (function_definition
71 name: (_) @function)
72
73 (struct_definition
74 name: (_) @type)
75
76 (typed_identifier
77 type: (_) @type)
78
79 ; Operators
80 (binary_expression
81 op: (_) @operator)
82
83 (unary_expression
84 op: (_) @operator)
85
86 [
87 (comparison_operator)
88 (mult_prec_operator)
89 (add_prec_operator)
90 (unary_prec_operator)
91 (assignment_prec_operator)
92 ] @operator
93
94 [
95 ":="
96 "=>"
97 "->"
98 "<=>"
99 ] @operator
100
101 [
102 ";"
103 "."
104 ","
105 ] @punctuation.delimiter
106
107 [
108 "("
109 ")"
110 "["
111 "]"
112 "{"
113 "}"
114 ] @punctuation.bracket
115
116 (property
117 [
118 "<"
119 ">"
120 ] @punctuation.bracket)
121
122 ; Properties, constants and variables
123 (component
124 id: (simple_identifier) @constant)
125
126 (property
127 name: (simple_identifier) @variable)
128
129 (binding_alias
130 name: (simple_identifier) @variable)
131
132 (binding
133 name: (simple_identifier) @variable)
134
135 (struct_block
136 (simple_identifier) @variable.other.member)
137
138 (anon_struct_block
139 (simple_identifier) @variable.other.member)
140
141 (property_assignment
142 property: (simple_identifier) @variable)
143
144 (states_definition
145 name: (simple_identifier) @variable)
146
147 (callback
148 name: (simple_identifier) @variable)
149
150 (typed_identifier
151 name: (_) @variable)
152
153 (simple_indexed_identifier
154 (simple_identifier) @variable)
155
156 (expression
157 (simple_identifier) @variable)
158
159 ; Attributes
160 [
161 (linear_gradient_identifier)
162 (radial_gradient_identifier)
163 (radial_gradient_kind)
164 ] @attribute
165
166 (image_call
167 "@image-url" @attribute)
168
169 (tr
170 "@tr" @attribute)
171
172 ; Keywords
173 (animate_option_identifier) @keyword
174
175 (export) @keyword.control.import
176
177 (if_statement
178 "if" @keyword.control.conditional)
179
180 (if_expr
181 [
182 "if"
183 "else"
184 ] @keyword.control.conditional)
185
186 (ternary_expression
187 [
188 "?"
189 ":"
190 ] @keyword.control.conditional)
191
192 (animate_statement
193 "animate" @keyword)
194
195 (callback
196 "callback" @keyword.function)
197
198 (component_definition
199 [
200 "component"
201 "inherits"
202 ] @keyword.storage.type)
203
204 (enum_definition
205 "enum" @keyword.storage.type)
206
207 (for_loop
208 [
209 "for"
210 "in"
211 ] @keyword.control.repeat)
212
213 (function_definition
214 "function" @keyword.function)
215
216 (global_definition
217 "global" @keyword.storage.type)
218
219 (imperative_block
220 "return" @keyword.control.return)
221
222 (import_statement
223 [
224 "import"
225 "from"
226 ] @keyword.control.import)
227
228 (import_type
229 "as" @keyword.control.import)
230
231 (property
232 "property" @keyword.storage.type)
233
234 (states_definition
235 [
236 "states"
237 "when"
238 ] @keyword)
239
240 (struct_definition
241 "struct" @keyword.storage.type)
242
243 (transitions_definition
244 [
245 "transitions"
246 "in"
247 "out"
248 ] @keyword)