PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.4.0
Code Block Pro – Beautiful Syntax Highlighting v1.4.0
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 / yaml.tmLanguage.json

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

622 lines 23.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/textmate/yaml.tmbundle/commit/e54ceae3b719506dba7e481a77cea4a8b576ae46",
8 "name": "yaml",
9 "scopeName": "source.yaml",
10 "patterns": [
11 {
12 "include": "#comment"
13 },
14 {
15 "include": "#property"
16 },
17 {
18 "include": "#directive"
19 },
20 {
21 "match": "^---",
22 "name": "entity.other.document.begin.yaml"
23 },
24 {
25 "match": "^\\.{3}",
26 "name": "entity.other.document.end.yaml"
27 },
28 {
29 "include": "#node"
30 }
31 ],
32 "repository": {
33 "block-collection": {
34 "patterns": [
35 {
36 "include": "#block-sequence"
37 },
38 {
39 "include": "#block-mapping"
40 }
41 ]
42 },
43 "block-mapping": {
44 "patterns": [
45 {
46 "include": "#block-pair"
47 }
48 ]
49 },
50 "block-node": {
51 "patterns": [
52 {
53 "include": "#prototype"
54 },
55 {
56 "include": "#block-scalar"
57 },
58 {
59 "include": "#block-collection"
60 },
61 {
62 "include": "#flow-scalar-plain-out"
63 },
64 {
65 "include": "#flow-node"
66 }
67 ]
68 },
69 "block-pair": {
70 "patterns": [
71 {
72 "begin": "\\?",
73 "beginCaptures": {
74 "1": {
75 "name": "punctuation.definition.key-value.begin.yaml"
76 }
77 },
78 "end": "(?=\\?)|^ *(:)|(:)",
79 "endCaptures": {
80 "1": {
81 "name": "punctuation.separator.key-value.mapping.yaml"
82 },
83 "2": {
84 "name": "invalid.illegal.expected-newline.yaml"
85 }
86 },
87 "name": "meta.block-mapping.yaml",
88 "patterns": [
89 {
90 "include": "#block-node"
91 }
92 ]
93 },
94 {
95 "begin": "(?x)\n (?=\n (?x:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n )\n (\n [^\\s:]\n | : \\S\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ",
96 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ",
97 "patterns": [
98 {
99 "include": "#flow-scalar-plain-out-implicit-type"
100 },
101 {
102 "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ",
103 "beginCaptures": {
104 "0": {
105 "name": "entity.name.tag.yaml"
106 }
107 },
108 "contentName": "entity.name.tag.yaml",
109 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ",
110 "name": "string.unquoted.plain.out.yaml"
111 }
112 ]
113 },
114 {
115 "match": ":(?=\\s|$)",
116 "name": "punctuation.separator.key-value.mapping.yaml"
117 }
118 ]
119 },
120 "block-scalar": {
121 "begin": "(?:(\\|)|(>))([1-9])?([-+])?(.*\\n?)",
122 "beginCaptures": {
123 "1": {
124 "name": "keyword.control.flow.block-scalar.literal.yaml"
125 },
126 "2": {
127 "name": "keyword.control.flow.block-scalar.folded.yaml"
128 },
129 "3": {
130 "name": "constant.numeric.indentation-indicator.yaml"
131 },
132 "4": {
133 "name": "storage.modifier.chomping-indicator.yaml"
134 },
135 "5": {
136 "patterns": [
137 {
138 "include": "#comment"
139 },
140 {
141 "match": ".+",
142 "name": "invalid.illegal.expected-comment-or-newline.yaml"
143 }
144 ]
145 }
146 },
147 "end": "^(?=\\S)|(?!\\G)",
148 "patterns": [
149 {
150 "begin": "^([ ]+)(?! )",
151 "end": "^(?!\\1|\\s*$)",
152 "name": "string.unquoted.block.yaml"
153 }
154 ]
155 },
156 "block-sequence": {
157 "match": "(-)(?!\\S)",
158 "name": "punctuation.definition.block.sequence.item.yaml"
159 },
160 "comment": {
161 "begin": "(?:(^[ \\t]*)|[ \\t]+)(?=#\\p{Print}*$)",
162 "beginCaptures": {
163 "1": {
164 "name": "punctuation.whitespace.comment.leading.yaml"
165 }
166 },
167 "end": "(?!\\G)",
168 "patterns": [
169 {
170 "begin": "#",
171 "beginCaptures": {
172 "0": {
173 "name": "punctuation.definition.comment.yaml"
174 }
175 },
176 "end": "\\n",
177 "name": "comment.line.number-sign.yaml"
178 }
179 ]
180 },
181 "directive": {
182 "begin": "^%",
183 "beginCaptures": {
184 "0": {
185 "name": "punctuation.definition.directive.begin.yaml"
186 }
187 },
188 "end": "(?=$|[ \\t]+($|#))",
189 "name": "meta.directive.yaml",
190 "patterns": [
191 {
192 "captures": {
193 "1": {
194 "name": "keyword.other.directive.yaml.yaml"
195 },
196 "2": {
197 "name": "constant.numeric.yaml-version.yaml"
198 }
199 },
200 "match": "\\G(YAML)[ \\t]+(\\d+\\.\\d+)"
201 },
202 {
203 "captures": {
204 "1": {
205 "name": "keyword.other.directive.tag.yaml"
206 },
207 "2": {
208 "name": "storage.type.tag-handle.yaml"
209 },
210 "3": {
211 "name": "support.type.tag-prefix.yaml"
212 }
213 },
214 "match": "(?x)\n \\G\n (TAG)\n (?:[ \\t]+\n ((?:!(?:[0-9A-Za-z\\-]*!)?))\n (?:[ \\t]+ (\n ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )*\n | (?![,!\\[\\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+\n )\n )?\n )?\n "
215 },
216 {
217 "captures": {
218 "1": {
219 "name": "support.other.directive.reserved.yaml"
220 },
221 "2": {
222 "name": "string.unquoted.directive-name.yaml"
223 },
224 "3": {
225 "name": "string.unquoted.directive-parameter.yaml"
226 }
227 },
228 "match": "(?x) \\G (\\w+) (?:[ \\t]+ (\\w+) (?:[ \\t]+ (\\w+))? )?"
229 },
230 {
231 "match": "\\S+",
232 "name": "invalid.illegal.unrecognized.yaml"
233 }
234 ]
235 },
236 "flow-alias": {
237 "captures": {
238 "1": {
239 "name": "keyword.control.flow.alias.yaml"
240 },
241 "2": {
242 "name": "punctuation.definition.alias.yaml"
243 },
244 "3": {
245 "name": "variable.other.alias.yaml"
246 },
247 "4": {
248 "name": "invalid.illegal.character.anchor.yaml"
249 }
250 },
251 "match": "((\\*))([^\\s\\[\\]/{/},]+)([^\\s\\]},]\\S*)?"
252 },
253 "flow-collection": {
254 "patterns": [
255 {
256 "include": "#flow-sequence"
257 },
258 {
259 "include": "#flow-mapping"
260 }
261 ]
262 },
263 "flow-mapping": {
264 "begin": "\\{",
265 "beginCaptures": {
266 "0": {
267 "name": "punctuation.definition.mapping.begin.yaml"
268 }
269 },
270 "end": "\\}",
271 "endCaptures": {
272 "0": {
273 "name": "punctuation.definition.mapping.end.yaml"
274 }
275 },
276 "name": "meta.flow-mapping.yaml",
277 "patterns": [
278 {
279 "include": "#prototype"
280 },
281 {
282 "match": ",",
283 "name": "punctuation.separator.mapping.yaml"
284 },
285 {
286 "include": "#flow-pair"
287 }
288 ]
289 },
290 "flow-node": {
291 "patterns": [
292 {
293 "include": "#prototype"
294 },
295 {
296 "include": "#flow-alias"
297 },
298 {
299 "include": "#flow-collection"
300 },
301 {
302 "include": "#flow-scalar"
303 }
304 ]
305 },
306 "flow-pair": {
307 "patterns": [
308 {
309 "begin": "\\?",
310 "beginCaptures": {
311 "0": {
312 "name": "punctuation.definition.key-value.begin.yaml"
313 }
314 },
315 "end": "(?=[},\\]])",
316 "name": "meta.flow-pair.explicit.yaml",
317 "patterns": [
318 {
319 "include": "#prototype"
320 },
321 {
322 "include": "#flow-pair"
323 },
324 {
325 "include": "#flow-node"
326 },
327 {
328 "begin": ":(?=\\s|$|[\\[\\]{},])",
329 "beginCaptures": {
330 "0": {
331 "name": "punctuation.separator.key-value.mapping.yaml"
332 }
333 },
334 "end": "(?=[},\\]])",
335 "patterns": [
336 {
337 "include": "#flow-value"
338 }
339 ]
340 }
341 ]
342 },
343 {
344 "begin": "(?x)\n (?=\n (?:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n )\n (\n [^\\s:[\\[\\]{},]]\n | : [^\\s[\\[\\]{},]]\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ",
345 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ",
346 "name": "meta.flow-pair.key.yaml",
347 "patterns": [
348 {
349 "include": "#flow-scalar-plain-in-implicit-type"
350 },
351 {
352 "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ",
353 "beginCaptures": {
354 "0": {
355 "name": "entity.name.tag.yaml"
356 }
357 },
358 "contentName": "entity.name.tag.yaml",
359 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ",
360 "name": "string.unquoted.plain.in.yaml"
361 }
362 ]
363 },
364 {
365 "include": "#flow-node"
366 },
367 {
368 "begin": ":(?=\\s|$|[\\[\\]{},])",
369 "captures": {
370 "0": {
371 "name": "punctuation.separator.key-value.mapping.yaml"
372 }
373 },
374 "end": "(?=[},\\]])",
375 "name": "meta.flow-pair.yaml",
376 "patterns": [
377 {
378 "include": "#flow-value"
379 }
380 ]
381 }
382 ]
383 },
384 "flow-scalar": {
385 "patterns": [
386 {
387 "include": "#flow-scalar-double-quoted"
388 },
389 {
390 "include": "#flow-scalar-single-quoted"
391 },
392 {
393 "include": "#flow-scalar-plain-in"
394 }
395 ]
396 },
397 "flow-scalar-double-quoted": {
398 "begin": "\"",
399 "beginCaptures": {
400 "0": {
401 "name": "punctuation.definition.string.begin.yaml"
402 }
403 },
404 "end": "\"",
405 "endCaptures": {
406 "0": {
407 "name": "punctuation.definition.string.end.yaml"
408 }
409 },
410 "name": "string.quoted.double.yaml",
411 "patterns": [
412 {
413 "match": "\\\\([0abtnvfre \"/\\\\N_Lp]|x\\d\\d|u\\d{4}|U\\d{8})",
414 "name": "constant.character.escape.yaml"
415 },
416 {
417 "match": "\\\\\\n",
418 "name": "constant.character.escape.double-quoted.newline.yaml"
419 }
420 ]
421 },
422 "flow-scalar-plain-in": {
423 "patterns": [
424 {
425 "include": "#flow-scalar-plain-in-implicit-type"
426 },
427 {
428 "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ",
429 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ",
430 "name": "string.unquoted.plain.in.yaml"
431 }
432 ]
433 },
434 "flow-scalar-plain-in-implicit-type": {
435 "patterns": [
436 {
437 "captures": {
438 "1": {
439 "name": "constant.language.null.yaml"
440 },
441 "2": {
442 "name": "constant.language.boolean.yaml"
443 },
444 "3": {
445 "name": "constant.numeric.integer.yaml"
446 },
447 "4": {
448 "name": "constant.numeric.float.yaml"
449 },
450 "5": {
451 "name": "constant.other.timestamp.yaml"
452 },
453 "6": {
454 "name": "constant.language.value.yaml"
455 },
456 "7": {
457 "name": "constant.language.merge.yaml"
458 }
459 },
460 "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n )\n "
461 }
462 ]
463 },
464 "flow-scalar-plain-out": {
465 "patterns": [
466 {
467 "include": "#flow-scalar-plain-out-implicit-type"
468 },
469 {
470 "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ",
471 "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ",
472 "name": "string.unquoted.plain.out.yaml"
473 }
474 ]
475 },
476 "flow-scalar-plain-out-implicit-type": {
477 "patterns": [
478 {
479 "captures": {
480 "1": {
481 "name": "constant.language.null.yaml"
482 },
483 "2": {
484 "name": "constant.language.boolean.yaml"
485 },
486 "3": {
487 "name": "constant.numeric.integer.yaml"
488 },
489 "4": {
490 "name": "constant.numeric.float.yaml"
491 },
492 "5": {
493 "name": "constant.other.timestamp.yaml"
494 },
495 "6": {
496 "name": "constant.language.value.yaml"
497 },
498 "7": {
499 "name": "constant.language.merge.yaml"
500 }
501 },
502 "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?x:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n )\n "
503 }
504 ]
505 },
506 "flow-scalar-single-quoted": {
507 "begin": "'",
508 "beginCaptures": {
509 "0": {
510 "name": "punctuation.definition.string.begin.yaml"
511 }
512 },
513 "end": "'(?!')",
514 "endCaptures": {
515 "0": {
516 "name": "punctuation.definition.string.end.yaml"
517 }
518 },
519 "name": "string.quoted.single.yaml",
520 "patterns": [
521 {
522 "match": "''",
523 "name": "constant.character.escape.single-quoted.yaml"
524 }
525 ]
526 },
527 "flow-sequence": {
528 "begin": "\\[",
529 "beginCaptures": {
530 "0": {
531 "name": "punctuation.definition.sequence.begin.yaml"
532 }
533 },
534 "end": "\\]",
535 "endCaptures": {
536 "0": {
537 "name": "punctuation.definition.sequence.end.yaml"
538 }
539 },
540 "name": "meta.flow-sequence.yaml",
541 "patterns": [
542 {
543 "include": "#prototype"
544 },
545 {
546 "match": ",",
547 "name": "punctuation.separator.sequence.yaml"
548 },
549 {
550 "include": "#flow-pair"
551 },
552 {
553 "include": "#flow-node"
554 }
555 ]
556 },
557 "flow-value": {
558 "patterns": [
559 {
560 "begin": "\\G(?![},\\]])",
561 "end": "(?=[},\\]])",
562 "name": "meta.flow-pair.value.yaml",
563 "patterns": [
564 {
565 "include": "#flow-node"
566 }
567 ]
568 }
569 ]
570 },
571 "node": {
572 "patterns": [
573 {
574 "include": "#block-node"
575 }
576 ]
577 },
578 "property": {
579 "begin": "(?=!|&)",
580 "end": "(?!\\G)",
581 "name": "meta.property.yaml",
582 "patterns": [
583 {
584 "captures": {
585 "1": {
586 "name": "keyword.control.property.anchor.yaml"
587 },
588 "2": {
589 "name": "punctuation.definition.anchor.yaml"
590 },
591 "3": {
592 "name": "entity.name.type.anchor.yaml"
593 },
594 "4": {
595 "name": "invalid.illegal.character.anchor.yaml"
596 }
597 },
598 "match": "\\G((&))([^\\s\\[\\]/{/},]+)(\\S+)?"
599 },
600 {
601 "match": "(?x)\n \\G\n (?:\n ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+ >\n | (?:!(?:[0-9A-Za-z\\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$_.~*'()] )+\n | !\n )\n (?=\\ |\\t|$)\n ",
602 "name": "storage.type.tag-handle.yaml"
603 },
604 {
605 "match": "\\S+",
606 "name": "invalid.illegal.tag-handle.yaml"
607 }
608 ]
609 },
610 "prototype": {
611 "patterns": [
612 {
613 "include": "#comment"
614 },
615 {
616 "include": "#property"
617 }
618 ]
619 }
620 }
621 }
622