PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.5
Code Block Pro – Beautiful Syntax Highlighting v1.27.5
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 / rst.tmLanguage.json

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

741 lines 16.0 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/trond-snekvik/vscode-rst/blob/master/syntaxes/rst.tmLanguage.json",
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/trond-snekvik/vscode-rst/commit/7f2d6bb4e20642b60f2979afcb594cfe4b48117a",
8 "scopeName": "source.rst",
9 "patterns": [
10 {
11 "include": "#body"
12 }
13 ],
14 "repository": {
15 "body": {
16 "patterns": [
17 {
18 "include": "#title"
19 },
20 {
21 "include": "#inline-markup"
22 },
23 {
24 "include": "#anchor"
25 },
26 {
27 "include": "#line-block"
28 },
29 {
30 "include": "#replace-include"
31 },
32 {
33 "include": "#footnote"
34 },
35 {
36 "include": "#substitution"
37 },
38 {
39 "include": "#blocks"
40 },
41 {
42 "include": "#table"
43 },
44 {
45 "include": "#simple-table"
46 },
47 {
48 "include": "#options-list"
49 }
50 ]
51 },
52 "title": {
53 "match": "^(\\*{3,}|#{3,}|\\={3,}|~{3,}|\\+{3,}|-{3,}|`{3,}|\\^{3,}|:{3,}|\"{3,}|_{3,}|'{3,})$",
54 "name": "markup.heading"
55 },
56 "inline-markup": {
57 "patterns": [
58 {
59 "include": "#escaped"
60 },
61 {
62 "include": "#ignore"
63 },
64 {
65 "include": "#ref"
66 },
67 {
68 "include": "#literal"
69 },
70 {
71 "include": "#monospaced"
72 },
73 {
74 "include": "#citation"
75 },
76 {
77 "include": "#bold"
78 },
79 {
80 "include": "#italic"
81 },
82 {
83 "include": "#list"
84 },
85 {
86 "include": "#macro"
87 },
88 {
89 "include": "#reference"
90 },
91 {
92 "include": "#footnote-ref"
93 }
94 ]
95 },
96 "ignore": {
97 "patterns": [
98 {
99 "match": "'[`*]+'"
100 },
101 {
102 "match": "<[`*]+>"
103 },
104 {
105 "match": "{[`*]+}"
106 },
107 {
108 "match": "\\([`*]+\\)"
109 },
110 {
111 "match": "\\[[`*]+\\]"
112 },
113 {
114 "match": "\"[`*]+\""
115 }
116 ]
117 },
118 "table": {
119 "begin": "^\\s*\\+[=+-]+\\+\\s*$",
120 "end": "^(?![+|])",
121 "beginCaptures": {
122 "0": {
123 "name": "keyword.control.table"
124 }
125 },
126 "patterns": [
127 {
128 "match": "[=+|-]",
129 "name": "keyword.control.table"
130 }
131 ]
132 },
133 "simple-table": {
134 "match": "^[=\\s]+$",
135 "name": "keyword.control.table"
136 },
137 "ref": {
138 "begin": "(:ref:)`",
139 "end": "`|^\\s*$",
140 "name": "entity.name.tag",
141 "beginCaptures": {
142 "1": {
143 "name": "keyword.control"
144 }
145 },
146 "patterns": [
147 {
148 "match": "<.*?>",
149 "name": "markup.underline.link"
150 }
151 ]
152 },
153 "reference": {
154 "match": "[\\w-]*[a-zA-Z\\d-]__?\\b",
155 "name": "entity.name.tag"
156 },
157 "macro": {
158 "match": "\\|[^\\|]+\\|",
159 "name": "entity.name.tag"
160 },
161 "literal": {
162 "match": "(:\\S+:)(`.*?`\\\\?)",
163 "captures": {
164 "1": {
165 "name": "keyword.control"
166 },
167 "2": {
168 "name": "entity.name.tag"
169 }
170 }
171 },
172 "monospaced": {
173 "begin": "(?<=[\\s\"'(\\[{<]|^)``[^\\s`]",
174 "end": "``|^\\s*$",
175 "name": "string.interpolated"
176 },
177 "citation": {
178 "begin": "(?<=[\\s\"'(\\[{<]|^)`[^\\s`]",
179 "end": "`_{,2}|^\\s*$",
180 "name": "entity.name.tag",
181 "applyEndPatternLast": 0
182 },
183 "bold": {
184 "begin": "(?<=[\\s\"'(\\[{<]|^)\\*{2}[^\\s*]",
185 "end": "\\*{2}|^\\s*$",
186 "name": "markup.bold"
187 },
188 "italic": {
189 "begin": "(?<=[\\s\"'(\\[{<]|^)\\*[^\\s*]",
190 "end": "\\*|^\\s*$",
191 "name": "markup.italic"
192 },
193 "escaped": {
194 "match": "\\\\.",
195 "name": "constant.character.escape"
196 },
197 "list": {
198 "match": "^\\s*(\\d+\\.|\\* -|[a-zA-Z#]\\.|[iIvVxXmMcC]+\\.|\\(\\d+\\)|\\d+\\)|[*+-])\\s+",
199 "name": "keyword.control"
200 },
201 "line-block": {
202 "match": "^\\|\\s+",
203 "name": "keyword.control"
204 },
205 "raw-html": {
206 "begin": "^(\\s*)(\\.{2}\\s+raw\\s*::)\\s+(html)\\s*$",
207 "while": "^\\1(?=\\s)|^\\s*$",
208 "beginCaptures": {
209 "2": {
210 "name": "keyword.control"
211 },
212 "3": {
213 "name": "variable.parameter.html"
214 }
215 },
216 "patterns": [
217 {
218 "include": "#block-param"
219 },
220 {
221 "include": "text.html.derivative"
222 }
223 ]
224 },
225 "anchor": {
226 "match": "^\\.{2}\\s+(_[^:]+:)\\s*",
227 "name": "entity.name.tag.anchor"
228 },
229 "replace-include": {
230 "match": "^\\s*(\\.{2})\\s+(\\|[^\\|]+\\|)\\s+(replace::)",
231 "captures": {
232 "1": {
233 "name": "keyword.control"
234 },
235 "2": {
236 "name": "entity.name.tag"
237 },
238 "3": {
239 "name": "keyword.control"
240 }
241 }
242 },
243 "footnote": {
244 "match": "^\\s*\\.{2}\\s+\\[(?:[\\w\\.-]+|[#*]|#\\w+)\\]\\s+",
245 "name": "entity.name.tag"
246 },
247 "footnote-ref": {
248 "match": "\\[(?:[\\w\\.-]+|[#*])\\]_",
249 "name": "entity.name.tag"
250 },
251 "substitution": {
252 "match": "^\\.{2}\\s*\\|([^|]+)\\|",
253 "name": "entity.name.tag"
254 },
255 "options-list": {
256 "match": "(?:(?:^|,\\s+)(?:[-+]\\w|--?[a-zA-Z][\\w-]+|/\\w+)(?:[ =](?:\\w+|<[^<>]+?>))?)+(?= |\\t|$)",
257 "name": "variable.parameter"
258 },
259 "blocks": {
260 "patterns": [
261 {
262 "include": "#domains"
263 },
264 {
265 "include": "#doctest"
266 },
267 {
268 "include": "#code-block-cpp"
269 },
270 {
271 "include": "#code-block-py"
272 },
273 {
274 "include": "#code-block-console"
275 },
276 {
277 "include": "#code-block-javascript"
278 },
279 {
280 "include": "#code-block-yaml"
281 },
282 {
283 "include": "#code-block-cmake"
284 },
285 {
286 "include": "#code-block-kconfig"
287 },
288 {
289 "include": "#code-block-ruby"
290 },
291 {
292 "include": "#code-block-dts"
293 },
294 {
295 "include": "#code-block"
296 },
297 {
298 "include": "#doctest-block"
299 },
300 {
301 "include": "#raw-html"
302 },
303 {
304 "include": "#block"
305 },
306 {
307 "include": "#literal-block"
308 },
309 {
310 "include": "#block-comment"
311 }
312 ]
313 },
314 "block-comment": {
315 "begin": "^(\\s*)\\.{2}(\\s+|$)",
316 "end": "^(?=\\S)|^\\s*$",
317 "name": "comment.block",
318 "patterns": [
319 {
320 "begin": "^\\s{3,}(?=\\S)",
321 "while": "^\\s{3}.*|^\\s*$",
322 "name": "comment.block"
323 }
324 ]
325 },
326 "literal-block": {
327 "begin": "^(\\s*)(.*)(::)\\s*$",
328 "while": "^\\1(?=\\s)|^\\s*$",
329 "beginCaptures": {
330 "2": {
331 "patterns": [
332 {
333 "include": "#inline-markup"
334 }
335 ]
336 },
337 "3": {
338 "name": "keyword.control"
339 }
340 }
341 },
342 "block": {
343 "begin": "^(\\s*)(\\.{2}\\s+\\S+::)(.*)",
344 "end": "^(?!\\1\\s|\\s*$)",
345 "beginCaptures": {
346 "2": {
347 "name": "keyword.control"
348 },
349 "3": {
350 "name": "variable"
351 }
352 },
353 "patterns": [
354 {
355 "include": "#block-param"
356 },
357 {
358 "include": "#body"
359 }
360 ]
361 },
362 "block-param": {
363 "patterns": [
364 {
365 "match": "(:param\\s+(.+?):)(?:\\s|$)",
366 "captures": {
367 "1": {
368 "name": "keyword.control"
369 },
370 "2": {
371 "name": "variable.parameter"
372 }
373 }
374 },
375 {
376 "match": "(:.+?:)(?:$|\\s+(.*))",
377 "captures": {
378 "1": {
379 "name": "keyword.control"
380 },
381 "2": {
382 "patterns": [
383 {
384 "match": "\\b(0x[a-fA-F\\d]+|\\d+)\\b",
385 "name": "constant.numeric"
386 },
387 {
388 "include": "#inline-markup"
389 }
390 ]
391 }
392 }
393 }
394 ]
395 },
396 "domains": {
397 "patterns": [
398 {
399 "include": "#domain-cpp"
400 },
401 {
402 "include": "#domain-py"
403 },
404 {
405 "include": "#domain-auto"
406 },
407 {
408 "include": "#domain-js"
409 }
410 ]
411 },
412 "domain-cpp": {
413 "begin": "^(\\s*)(\\.{2}\\s+(?:cpp|c):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\\s*(?:(@\\w+)|(.*))",
414 "while": "^\\1(?=\\s)|^\\s*$",
415 "beginCaptures": {
416 "2": {
417 "name": "keyword.control"
418 },
419 "3": {
420 "name": "entity.name.tag"
421 },
422 "4": {
423 "patterns": [
424 {
425 "include": "source.cpp"
426 }
427 ]
428 }
429 },
430 "patterns": [
431 {
432 "include": "#block-param"
433 },
434 {
435 "include": "#body"
436 }
437 ]
438 },
439 "domain-py": {
440 "begin": "^(\\s*)(\\.{2}\\s+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\\s*(.*)",
441 "while": "^\\1(?=\\s)|^\\s*$",
442 "beginCaptures": {
443 "2": {
444 "name": "keyword.control"
445 },
446 "3": {
447 "patterns": [
448 {
449 "include": "source.python"
450 }
451 ]
452 }
453 },
454 "patterns": [
455 {
456 "include": "#block-param"
457 },
458 {
459 "include": "#body"
460 }
461 ]
462 },
463 "domain-auto": {
464 "begin": "^(\\s*)(\\.{2}\\s+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\\s*(.*)",
465 "while": "^\\1(?=\\s)|^\\s*$",
466 "beginCaptures": {
467 "2": {
468 "name": "keyword.control.py"
469 },
470 "3": {
471 "patterns": [
472 {
473 "include": "source.python"
474 }
475 ]
476 }
477 },
478 "patterns": [
479 {
480 "include": "#block-param"
481 },
482 {
483 "include": "#body"
484 }
485 ]
486 },
487 "domain-js": {
488 "begin": "^(\\s*)(\\.{2}\\s+js:\\w+::)\\s*(.*)",
489 "end": "^(?!\\1[ \\t]|$)",
490 "beginCaptures": {
491 "2": {
492 "name": "keyword.control"
493 },
494 "3": {
495 "patterns": [
496 {
497 "include": "source.js"
498 }
499 ]
500 }
501 },
502 "patterns": [
503 {
504 "include": "#block-param"
505 },
506 {
507 "include": "#body"
508 }
509 ]
510 },
511 "doctest": {
512 "begin": "^(>>>)\\s*(.*)",
513 "end": "^\\s*$",
514 "beginCaptures": {
515 "1": {
516 "name": "keyword.control"
517 },
518 "2": {
519 "patterns": [
520 {
521 "include": "source.python"
522 }
523 ]
524 }
525 }
526 },
527 "code-block-cpp": {
528 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(c|c\\+\\+|cpp|C|C\\+\\+|CPP|Cpp)\\s*$",
529 "while": "^\\1(?=\\s)|^\\s*$",
530 "beginCaptures": {
531 "2": {
532 "name": "keyword.control"
533 },
534 "4": {
535 "name": "variable.parameter.codeblock.cpp"
536 }
537 },
538 "patterns": [
539 {
540 "include": "#block-param"
541 },
542 {
543 "include": "source.cpp"
544 }
545 ]
546 },
547 "code-block-console": {
548 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(console|shell|bash)\\s*$",
549 "while": "^\\1(?=\\s)|^\\s*$",
550 "beginCaptures": {
551 "2": {
552 "name": "keyword.control"
553 },
554 "4": {
555 "name": "variable.parameter.codeblock.console"
556 }
557 },
558 "patterns": [
559 {
560 "include": "#block-param"
561 },
562 {
563 "include": "source.shell"
564 }
565 ]
566 },
567 "code-block-py": {
568 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(python)\\s*$",
569 "while": "^\\1(?=\\s)|^\\s*$",
570 "beginCaptures": {
571 "2": {
572 "name": "keyword.control"
573 },
574 "4": {
575 "name": "variable.parameter.codeblock.py"
576 }
577 },
578 "patterns": [
579 {
580 "include": "#block-param"
581 },
582 {
583 "include": "source.python"
584 }
585 ]
586 },
587 "code-block-javascript": {
588 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(javascript)\\s*$",
589 "while": "^\\1(?=\\s)|^\\s*$",
590 "beginCaptures": {
591 "2": {
592 "name": "keyword.control"
593 },
594 "4": {
595 "name": "variable.parameter.codeblock.js"
596 }
597 },
598 "patterns": [
599 {
600 "include": "#block-param"
601 },
602 {
603 "include": "source.js"
604 }
605 ]
606 },
607 "code-block-yaml": {
608 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ya?ml)\\s*$",
609 "while": "^\\1(?=\\s)|^\\s*$",
610 "beginCaptures": {
611 "2": {
612 "name": "keyword.control"
613 },
614 "4": {
615 "name": "variable.parameter.codeblock.yaml"
616 }
617 },
618 "patterns": [
619 {
620 "include": "#block-param"
621 },
622 {
623 "include": "source.yaml"
624 }
625 ]
626 },
627 "code-block-cmake": {
628 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(cmake)\\s*$",
629 "while": "^\\1(?=\\s)|^\\s*$",
630 "beginCaptures": {
631 "2": {
632 "name": "keyword.control"
633 },
634 "4": {
635 "name": "variable.parameter.codeblock.cmake"
636 }
637 },
638 "patterns": [
639 {
640 "include": "#block-param"
641 },
642 {
643 "include": "source.cmake"
644 }
645 ]
646 },
647 "code-block-kconfig": {
648 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*([kK]config)\\s*$",
649 "while": "^\\1(?=\\s)|^\\s*$",
650 "beginCaptures": {
651 "2": {
652 "name": "keyword.control"
653 },
654 "4": {
655 "name": "variable.parameter.codeblock.kconfig"
656 }
657 },
658 "patterns": [
659 {
660 "include": "#block-param"
661 },
662 {
663 "include": "source.kconfig"
664 }
665 ]
666 },
667 "code-block-ruby": {
668 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ruby)\\s*$",
669 "while": "^\\1(?=\\s)|^\\s*$",
670 "beginCaptures": {
671 "2": {
672 "name": "keyword.control"
673 },
674 "4": {
675 "name": "variable.parameter.codeblock.ruby"
676 }
677 },
678 "patterns": [
679 {
680 "include": "#block-param"
681 },
682 {
683 "include": "source.ruby"
684 }
685 ]
686 },
687 "code-block-dts": {
688 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(dts|DTS|devicetree)\\s*$",
689 "while": "^\\1(?=\\s)|^\\s*$",
690 "beginCaptures": {
691 "2": {
692 "name": "keyword.control"
693 },
694 "4": {
695 "name": "variable.parameter.codeblock.dts"
696 }
697 },
698 "patterns": [
699 {
700 "include": "#block-param"
701 },
702 {
703 "include": "source.dts"
704 }
705 ]
706 },
707 "code-block": {
708 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)",
709 "while": "^\\1(?=\\s)|^\\s*$",
710 "beginCaptures": {
711 "2": {
712 "name": "keyword.control"
713 }
714 },
715 "patterns": [
716 {
717 "include": "#block-param"
718 }
719 ]
720 },
721 "doctest-block": {
722 "begin": "^(\\s*)(\\.{2}\\s+doctest::)\\s*$",
723 "while": "^\\1(?=\\s)|^\\s*$",
724 "beginCaptures": {
725 "2": {
726 "name": "keyword.control"
727 }
728 },
729 "patterns": [
730 {
731 "include": "#block-param"
732 },
733 {
734 "include": "source.python"
735 }
736 ]
737 }
738 },
739 "name": "rst"
740 }
741