Debian Codegraph @

runtime/queries/slint/highlights.scm

raw symbols SCIP
1 [(line_comment) (block_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 (function_declaration
74 name: (_) @function)
75
76 (struct_definition
77 name: (_) @type)
78
79 (typed_identifier
80 type: (_) @type)
81
82 ; Operators
83 (binary_expression
84 op: (_) @operator)
85
86 (unary_expression
87 op: (_) @operator)
88
89 [
90 (comparison_operator)
91 (mult_prec_operator)
92 (add_prec_operator)
93 (unary_prec_operator)
94 (assignment_prec_operator)
95 ] @operator
96
97 [
98 ":="
99 "=>"
100 "->"
101 "<=>"
102 ] @operator
103
104 [
105 ";"
106 "."
107 ","
108 ] @punctuation.delimiter
109
110 [
111 "("
112 ")"
113 "["
114 "]"
115 "{"
116 "}"
117 ] @punctuation.bracket
118
119 (property
120 [
121 "<"
122 ">"
123 ] @punctuation.bracket)
124
125 ; Properties, constants and variables
126 (component
127 id: (simple_identifier) @constant)
128
129 (property
130 name: (simple_identifier) @variable)
131
132 (binding_alias
133 name: (simple_identifier) @variable)
134
135 (struct_field_definition
136 name: (simple_identifier) @variable.other.member)
137
138 (anon_struct_assignment
139 member: (simple_identifier) @variable.other.member)
140
141 (property_assignment
142 property: (simple_identifier) @variable)
143
144 (state_definition
145 name: (simple_identifier) @variable
146 "when" @keyword)
147
148 (callback
149 name: (simple_identifier) @variable)
150
151 (typed_identifier
152 name: (_) @variable)
153
154 (simple_indexed_identifier
155 (simple_identifier) @variable)
156
157 (expression
158 (simple_identifier) @variable)
159
160 ; Attributes
161 [
162 (linear_gradient_identifier)
163 (radial_gradient_identifier)
164 (radial_gradient_kind)
165 (conic_gradient_identifier)
166 ] @attribute
167
168 (image_call
169 "@image-url" @attribute)
170
171 (tr
172 "@tr" @attribute)
173
174 (rust_attr
175 "@rust-attr" @attribute)
176
177 (keys
178 "@keys" @attribute)
179
180 (markdown
181 "@markdown" @attribute)
182
183 (keys
184 (simple_identifier) @constant)
185
186 (keys
187 "+" @operator)
188
189 ; Keywords
190 (animate_option_identifier) @keyword
191
192 (export_statement
193 "export" @keyword.control.import)
194
195 (exported_definition
196 "export" @keyword.control.import)
197
198 (if_statement
199 "if" @keyword.control.conditional)
200
201 (if_expr
202 [
203 "if"
204 "else"
205 ] @keyword.control.conditional)
206
207 (ternary_expression
208 [
209 "?"
210 ":"
211 ] @keyword.control.conditional)
212
213 (animate_statement
214 "animate" @keyword)
215
216 (callback
217 "callback" @keyword.function)
218
219 (component_definition
220 "component" @keyword.storage.type)
221
222 (component_modifier
223 "inherits" @keyword.storage.type)
224
225 (uses_clause
226 "uses" @keyword.storage.type)
227
228 (implements_clause
229 "implements" @keyword.storage.type)
230
231 (used_interface
232 "from" @keyword.control.import
233 source: (_) @variable)
234
235 (changed_event
236 "changed" @keyword)
237
238 (gradient_call
239 [
240 "at"
241 "from"
242 ] @keyword)
243
244 (enum_definition
245 "enum" @keyword.storage.type)
246
247 (for_loop
248 [
249 "for"
250 "in"
251 ] @keyword.control.repeat)
252
253 (function_definition
254 "function" @keyword.function)
255
256 (function_declaration
257 "function" @keyword.function)
258
259 (let_statement
260 "let" @keyword.storage.type
261 name: (_) @variable
262 "=" @operator)
263
264 (global_definition
265 "global" @keyword.storage.type)
266
267 (return_statement
268 "return" @keyword.control.return)
269
270 (import_statement
271 [
272 "import"
273 "from"
274 ] @keyword.control.import)
275
276 (import_type
277 "as" @keyword.control.import)
278
279 (property
280 "property" @keyword.storage.type)
281
282 (states_definition
283 "states" @keyword)
284
285 (struct_definition
286 "struct" @keyword.storage.type)
287
288 (transitions_definition
289 [
290 "transitions"
291 "in"
292 "out"
293 ] @keyword)