Debian Codegraph @

runtime/queries/concerto/highlights.scm

raw symbols SCIP
1 ; Concerto Language - Syntax Highlighting Queries (Helix)
2 ; =======================================================
3 ; Helix-specific capture names. For use in helix-editor/helix at
4 ; runtime/queries/concerto/highlights.scm
5 ;
6 ; Precedence: later patterns override earlier ones (last match wins).
7
8 ; Keywords
9 ; --------
10
11 ; Declaration keywords
12 [
13 "concept"
14 "asset"
15 "participant"
16 "transaction"
17 "event"
18 "enum"
19 "scalar"
20 "map"
21 ] @keyword.storage.type
22
23 [
24 "namespace"
25 "import"
26 "from"
27 ] @keyword.control.import
28
29 [
30 "extends"
31 ] @keyword
32
33 [
34 "abstract"
35 ] @keyword.storage.modifier
36
37 [
38 "identified"
39 "by"
40 ] @keyword
41
42 [
43 "optional"
44 ] @keyword.storage.modifier
45
46 [
47 "concerto"
48 "version"
49 ] @keyword
50
51 [
52 "default"
53 ] @keyword
54
55 [
56 "regex"
57 "range"
58 "length"
59 ] @keyword
60
61 [
62 "as"
63 ] @keyword
64
65 ; Primitive type keywords
66 [
67 "String"
68 "Boolean"
69 "DateTime"
70 "Integer"
71 "Long"
72 "Double"
73 ] @type.builtin
74
75 (primitive_type) @type.builtin
76
77 ; Boolean literals
78 (boolean_literal) @constant.builtin.boolean
79
80 ; Comments
81 ; --------
82 (line_comment) @comment.line
83 (block_comment) @comment.block
84
85 ; Strings
86 ; -------
87 (string_literal) @string
88 (escape_sequence) @constant.character.escape
89
90 ; Numbers
91 ; -------
92 (signed_integer) @constant.numeric
93 (signed_real) @constant.numeric
94 (signed_number) @constant.numeric
95
96 ; Regex
97 ; -----
98 (regex_literal) @string.regexp
99
100 ; Decorators
101 ; ----------
102 (decorator
103 "@" @attribute
104 name: (identifier) @attribute)
105
106 ; Namespace and imports
107 ; --------------------
108 (namespace_path) @namespace
109
110 (import_path) @namespace
111
112 (uri) @string.special
113
114 ; Version
115 ; -------
116 (concerto_version
117 (string_literal) @string.special)
118
119 ; Type identifiers (in type position)
120 ; -----------------------------------
121 (concept_declaration
122 name: (type_identifier) @type)
123
124 (asset_declaration
125 name: (type_identifier) @type)
126
127 (participant_declaration
128 name: (type_identifier) @type)
129
130 (transaction_declaration
131 name: (type_identifier) @type)
132
133 (event_declaration
134 name: (type_identifier) @type)
135
136 (enum_declaration
137 name: (type_identifier) @type)
138
139 (scalar_declaration
140 name: (type_identifier) @type)
141
142 (map_declaration
143 name: (type_identifier) @type)
144
145 (extends_clause
146 (type_identifier) @type)
147
148 ; Field type references
149 (object_field
150 type: (type_identifier) @type)
151
152 (relationship_field
153 type: (type_identifier) @type)
154
155 ; Map type references
156 (map_key_type
157 type: (type_identifier) @type)
158
159 (map_value_property
160 type: (type_identifier) @type)
161
162 (map_value_relationship
163 type: (type_identifier) @type)
164
165 ; Decorator identifier references
166 (decorator_identifier_ref
167 (type_identifier) @type)
168
169 ; Import type name
170 (import_single
171 type: (identifier) @type)
172
173 (type_list_item
174 (identifier) @type)
175
176 (aliased_type
177 original: (identifier) @type
178 alias: (identifier) @type)
179
180 ; Field/property names
181 ; --------------------
182 (string_field
183 name: (identifier) @variable.other.member)
184
185 (boolean_field
186 name: (identifier) @variable.other.member)
187
188 (datetime_field
189 name: (identifier) @variable.other.member)
190
191 (integer_field
192 name: (identifier) @variable.other.member)
193
194 (long_field
195 name: (identifier) @variable.other.member)
196
197 (double_field
198 name: (identifier) @variable.other.member)
199
200 (object_field
201 name: (identifier) @variable.other.member)
202
203 (relationship_field
204 name: (identifier) @variable.other.member)
205
206 (enum_property
207 name: (identifier) @variable.other.member)
208
209 ; Identified by field name
210 (identified_by
211 field: (identifier) @variable.other.member)
212
213 ; Relationship arrow
214 "-->" @operator
215
216 ; Property indicator
217 "o" @punctuation.special
218
219 ; Array indicator
220 (array_indicator) @punctuation.bracket
221
222 ; Wildcards in imports
223 "*" @operator
224
225 ; Delimiters
226 ; ----------
227 "{" @punctuation.bracket
228 "}" @punctuation.bracket
229 "(" @punctuation.bracket
230 ")" @punctuation.bracket
231 "[" @punctuation.bracket
232 "]" @punctuation.bracket
233 "," @punctuation.delimiter
234 "." @punctuation.delimiter
235 "=" @operator