PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.9.1
Code Block Pro – Beautiful Syntax Highlighting v1.9.1
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / prisma.tmLanguage.json

prisma.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.9.1, at build/shiki/languages/prisma.tmLanguage.json

441 lines 9.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "prisma",
3 "scopeName": "source.prisma",
4 "fileTypes": ["prisma"],
5 "patterns": [
6 {
7 "include": "#triple_comment"
8 },
9 {
10 "include": "#double_comment"
11 },
12 {
13 "include": "#model_block_definition"
14 },
15 {
16 "include": "#config_block_definition"
17 },
18 {
19 "include": "#enum_block_definition"
20 },
21 {
22 "include": "#type_definition"
23 }
24 ],
25 "repository": {
26 "model_block_definition": {
27 "begin": "^\\s*(model|type)\\s+([A-Za-z][\\w]*)\\s*({)",
28 "name": "source.prisma.embedded.source",
29 "beginCaptures": {
30 "1": {
31 "name": "storage.type.model.prisma"
32 },
33 "2": {
34 "name": "entity.name.type.model.prisma"
35 },
36 "3": {
37 "name": "punctuation.definition.tag.prisma"
38 }
39 },
40 "patterns": [
41 {
42 "include": "#triple_comment"
43 },
44 {
45 "include": "#double_comment"
46 },
47 {
48 "include": "#field_definition"
49 }
50 ],
51 "end": "\\s*\\}",
52 "endCaptures": {
53 "0": {
54 "name": "punctuation.definition.tag.prisma"
55 }
56 }
57 },
58 "enum_block_definition": {
59 "begin": "^\\s*(enum)\\s+([A-Za-z][\\w]*)\\s+({)",
60 "name": "source.prisma.embedded.source",
61 "beginCaptures": {
62 "1": {
63 "name": "storage.type.enum.prisma"
64 },
65 "2": {
66 "name": "entity.name.type.enum.prisma"
67 },
68 "3": {
69 "name": "punctuation.definition.tag.prisma"
70 }
71 },
72 "patterns": [
73 {
74 "include": "#triple_comment"
75 },
76 {
77 "include": "#double_comment"
78 },
79 {
80 "include": "#enum_value_definition"
81 }
82 ],
83 "end": "\\s*\\}",
84 "endCaptures": {
85 "0": {
86 "name": "punctuation.definition.tag.prisma"
87 }
88 }
89 },
90 "config_block_definition": {
91 "begin": "^\\s*(generator|datasource)\\s+([A-Za-z][\\w]*)\\s+({)",
92 "name": "source.prisma.embedded.source",
93 "beginCaptures": {
94 "1": {
95 "name": "storage.type.config.prisma"
96 },
97 "2": {
98 "name": "entity.name.type.config.prisma"
99 },
100 "3": {
101 "name": "punctuation.definition.tag.prisma"
102 }
103 },
104 "patterns": [
105 {
106 "include": "#triple_comment"
107 },
108 {
109 "include": "#double_comment"
110 },
111 {
112 "include": "#assignment"
113 }
114 ],
115 "end": "\\s*\\}",
116 "endCaptures": {
117 "1": {
118 "name": "punctuation.definition.tag.prisma"
119 }
120 }
121 },
122 "assignment": {
123 "patterns": [
124 {
125 "begin": "^\\s*(\\w+)\\s*(=)\\s*",
126 "beginCaptures": {
127 "1": {
128 "name": "variable.other.assignment.prisma"
129 },
130 "2": {
131 "name": "keyword.operator.terraform"
132 }
133 },
134 "patterns": [
135 {
136 "include": "#value"
137 },
138 {
139 "include": "#double_comment_inline"
140 }
141 ],
142 "end": "\\n"
143 }
144 ]
145 },
146 "field_definition": {
147 "name": "scalar.field",
148 "patterns": [
149 {
150 "match": "^\\s*(\\w+)(\\s*:)?\\s+((?!(?:Int|String|DateTime|Bytes|Decimal|Float|Json|Boolean)\\b)\\b\\w+)?(Int|String|DateTime|Bytes|Decimal|Float|Json|Boolean)?(\\[\\])?(\\?)?(\\!)?",
151 "captures": {
152 "1": {
153 "name": "variable.other.assignment.prisma"
154 },
155 "2": {
156 "name": "invalid.illegal.colon.prisma"
157 },
158 "3": {
159 "name": "variable.language.relations.prisma"
160 },
161 "4": {
162 "name": "support.type.primitive.prisma"
163 },
164 "5": {
165 "name": "keyword.operator.list_type.prisma"
166 },
167 "6": {
168 "name": "keyword.operator.optional_type.prisma"
169 },
170 "7": {
171 "name": "invalid.illegal.required_type.prisma"
172 }
173 }
174 },
175 {
176 "include": "#attribute_with_arguments"
177 },
178 {
179 "include": "#attribute"
180 }
181 ]
182 },
183 "type_definition": {
184 "patterns": [
185 {
186 "match": "^\\s*(type)\\s+(\\w+)\\s*=\\s*(\\w+)",
187 "captures": {
188 "1": {
189 "name": "storage.type.type.prisma"
190 },
191 "2": {
192 "name": "entity.name.type.type.prisma"
193 },
194 "3": {
195 "name": "support.type.primitive.prisma"
196 }
197 }
198 },
199 {
200 "include": "#attribute_with_arguments"
201 },
202 {
203 "include": "#attribute"
204 }
205 ]
206 },
207 "enum_value_definition": {
208 "patterns": [
209 {
210 "match": "^\\s*(\\w+)\\s*",
211 "captures": {
212 "1": {
213 "name": "variable.other.assignment.prisma"
214 }
215 }
216 },
217 {
218 "include": "#attribute_with_arguments"
219 },
220 {
221 "include": "#attribute"
222 }
223 ]
224 },
225 "attribute_with_arguments": {
226 "name": "source.prisma.attribute.with_arguments",
227 "begin": "(@@?[\\w\\.]+)(\\()",
228 "beginCaptures": {
229 "1": {
230 "name": "entity.name.function.attribute.prisma"
231 },
232 "2": {
233 "name": "punctuation.definition.tag.prisma"
234 }
235 },
236 "patterns": [
237 {
238 "include": "#named_argument"
239 },
240 {
241 "include": "#value"
242 }
243 ],
244 "end": "\\)",
245 "endCaptures": {
246 "0": {
247 "name": "punctuation.definition.tag.prisma"
248 }
249 }
250 },
251 "attribute": {
252 "name": "source.prisma.attribute",
253 "match": "(@@?[\\w\\.]+)",
254 "captures": {
255 "1": {
256 "name": "entity.name.function.attribute.prisma"
257 }
258 }
259 },
260 "array": {
261 "name": "source.prisma.array",
262 "begin": "\\[",
263 "beginCaptures": {
264 "1": {
265 "name": "punctuation.definition.tag.prisma"
266 }
267 },
268 "patterns": [
269 {
270 "include": "#value"
271 }
272 ],
273 "end": "\\]",
274 "endCaptures": {
275 "1": {
276 "name": "punctuation.definition.tag.prisma"
277 }
278 }
279 },
280 "value": {
281 "name": "source.prisma.value",
282 "patterns": [
283 {
284 "include": "#array"
285 },
286 {
287 "include": "#functional"
288 },
289 {
290 "include": "#literal"
291 }
292 ]
293 },
294 "functional": {
295 "name": "source.prisma.functional",
296 "begin": "(\\w+)(\\()",
297 "beginCaptures": {
298 "1": {
299 "name": "support.function.functional.prisma"
300 },
301 "2": {
302 "name": "punctuation.definition.tag.prisma"
303 }
304 },
305 "patterns": [
306 {
307 "include": "#value"
308 }
309 ],
310 "end": "\\)",
311 "endCaptures": {
312 "0": {
313 "name": "punctuation.definition.tag.prisma"
314 }
315 }
316 },
317 "literal": {
318 "name": "source.prisma.literal",
319 "patterns": [
320 {
321 "include": "#boolean"
322 },
323 {
324 "include": "#number"
325 },
326 {
327 "include": "#double_quoted_string"
328 },
329 {
330 "include": "#identifier"
331 }
332 ]
333 },
334 "identifier": {
335 "patterns": [
336 {
337 "match": "\\b(\\w)+\\b",
338 "name": "support.constant.constant.prisma"
339 }
340 ]
341 },
342 "map_key": {
343 "name": "source.prisma.key",
344 "patterns": [
345 {
346 "match": "(\\w+)\\s*(:)\\s*",
347 "captures": {
348 "1": {
349 "name": "variable.parameter.key.prisma"
350 },
351 "2": {
352 "name": "punctuation.definition.separator.key-value.prisma"
353 }
354 }
355 }
356 ]
357 },
358 "named_argument": {
359 "name": "source.prisma.named_argument",
360 "patterns": [
361 {
362 "include": "#map_key"
363 },
364 {
365 "include": "#value"
366 }
367 ]
368 },
369 "triple_comment": {
370 "begin": "///",
371 "end": "$\\n?",
372 "name": "comment.prisma"
373 },
374 "double_comment": {
375 "begin": "//",
376 "end": "$\\n?",
377 "name": "comment.prisma"
378 },
379 "double_comment_inline": {
380 "match": "//[^\\n]*",
381 "name": "comment.prisma"
382 },
383 "boolean": {
384 "match": "\\b(true|false)\\b",
385 "name": "constant.language.boolean.prisma"
386 },
387 "number": {
388 "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b",
389 "name": "constant.numeric.prisma"
390 },
391 "double_quoted_string": {
392 "begin": "\"",
393 "beginCaptures": {
394 "0": {
395 "name": "string.quoted.double.start.prisma"
396 }
397 },
398 "end": "\"",
399 "endCaptures": {
400 "0": {
401 "name": "string.quoted.double.end.prisma"
402 }
403 },
404 "patterns": [
405 {
406 "include": "#string_interpolation"
407 },
408 {
409 "match": "([\\w\\-\\/\\._\\\\%@:\\?=]+)",
410 "name": "string.quoted.double.prisma"
411 }
412 ],
413 "name": "unnamed"
414 },
415 "string_interpolation": {
416 "patterns": [
417 {
418 "begin": "\\$\\{",
419 "beginCaptures": {
420 "0": {
421 "name": "keyword.control.interpolation.start.prisma"
422 }
423 },
424 "end": "\\s*\\}",
425 "endCaptures": {
426 "0": {
427 "name": "keyword.control.interpolation.end.prisma"
428 }
429 },
430 "name": "source.tag.embedded.source.prisma",
431 "patterns": [
432 {
433 "include": "#value"
434 }
435 ]
436 }
437 ]
438 }
439 }
440 }
441