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

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

734 lines 15.8 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/f0fe19ffde6509be52ad9267a57e1b3df665f072",
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": "^((?:-\\w|--[\\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}",
316 "while": "^\\1(?=\\s)|^\\s*$",
317 "name": "comment.block"
318 },
319 "literal-block": {
320 "begin": "^(\\s*)(.*)(::)\\s*$",
321 "while": "^\\1(?=\\s)|^\\s*$",
322 "beginCaptures": {
323 "2": {
324 "patterns": [
325 {
326 "include": "#inline-markup"
327 }
328 ]
329 },
330 "3": {
331 "name": "keyword.control"
332 }
333 }
334 },
335 "block": {
336 "begin": "^(\\s*)(\\.{2}\\s+\\S+::)(.*)",
337 "while": "^\\1(?=\\s)|^\\s*$",
338 "beginCaptures": {
339 "2": {
340 "name": "keyword.control"
341 },
342 "3": {
343 "name": "variable"
344 }
345 },
346 "patterns": [
347 {
348 "include": "#block-param"
349 },
350 {
351 "include": "#body"
352 }
353 ]
354 },
355 "block-param": {
356 "patterns": [
357 {
358 "match": "(:param\\s+(.+?):)(?:\\s|$)",
359 "captures": {
360 "1": {
361 "name": "keyword.control"
362 },
363 "2": {
364 "name": "variable.parameter"
365 }
366 }
367 },
368 {
369 "match": "(:.+?:)(?:$|\\s+(.*))",
370 "captures": {
371 "1": {
372 "name": "keyword.control"
373 },
374 "2": {
375 "patterns": [
376 {
377 "match": "\\b(0x[a-fA-F\\d]+|\\d+)\\b",
378 "name": "constant.numeric"
379 },
380 {
381 "include": "#inline-markup"
382 }
383 ]
384 }
385 }
386 }
387 ]
388 },
389 "domains": {
390 "patterns": [
391 {
392 "include": "#domain-cpp"
393 },
394 {
395 "include": "#domain-py"
396 },
397 {
398 "include": "#domain-auto"
399 },
400 {
401 "include": "#domain-js"
402 }
403 ]
404 },
405 "domain-cpp": {
406 "begin": "^(\\s*)(\\.{2}\\s+(?:cpp|c):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\\s*(?:(@\\w+)|(.*))",
407 "while": "^\\1(?=\\s)|^\\s*$",
408 "beginCaptures": {
409 "2": {
410 "name": "keyword.control"
411 },
412 "3": {
413 "name": "entity.name.tag"
414 },
415 "4": {
416 "patterns": [
417 {
418 "include": "source.cpp"
419 }
420 ]
421 }
422 },
423 "patterns": [
424 {
425 "include": "#block-param"
426 },
427 {
428 "include": "#body"
429 }
430 ]
431 },
432 "domain-py": {
433 "begin": "^(\\s*)(\\.{2}\\s+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\\s*(.*)",
434 "while": "^\\1(?=\\s)|^\\s*$",
435 "beginCaptures": {
436 "2": {
437 "name": "keyword.control"
438 },
439 "3": {
440 "patterns": [
441 {
442 "include": "source.python"
443 }
444 ]
445 }
446 },
447 "patterns": [
448 {
449 "include": "#block-param"
450 },
451 {
452 "include": "#body"
453 }
454 ]
455 },
456 "domain-auto": {
457 "begin": "^(\\s*)(\\.{2}\\s+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\\s*(.*)",
458 "while": "^\\1(?=\\s)|^\\s*$",
459 "beginCaptures": {
460 "2": {
461 "name": "keyword.control.py"
462 },
463 "3": {
464 "patterns": [
465 {
466 "include": "source.python"
467 }
468 ]
469 }
470 },
471 "patterns": [
472 {
473 "include": "#block-param"
474 },
475 {
476 "include": "#body"
477 }
478 ]
479 },
480 "domain-js": {
481 "begin": "^(\\s*)(\\.{2}\\s+js:\\w+::)\\s*(.*)",
482 "end": "^(?!\\1[ \\t]|$)",
483 "beginCaptures": {
484 "2": {
485 "name": "keyword.control"
486 },
487 "3": {
488 "patterns": [
489 {
490 "include": "source.js"
491 }
492 ]
493 }
494 },
495 "patterns": [
496 {
497 "include": "#block-param"
498 },
499 {
500 "include": "#body"
501 }
502 ]
503 },
504 "doctest": {
505 "begin": "^(>>>)\\s*(.*)",
506 "end": "^\\s*$",
507 "beginCaptures": {
508 "1": {
509 "name": "keyword.control"
510 },
511 "2": {
512 "patterns": [
513 {
514 "include": "source.python"
515 }
516 ]
517 }
518 }
519 },
520 "code-block-cpp": {
521 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(c|c\\+\\+|cpp|C|C\\+\\+|CPP|Cpp)\\s*$",
522 "while": "^\\1(?=\\s)|^\\s*$",
523 "beginCaptures": {
524 "2": {
525 "name": "keyword.control"
526 },
527 "4": {
528 "name": "variable.parameter.codeblock.cpp"
529 }
530 },
531 "patterns": [
532 {
533 "include": "#block-param"
534 },
535 {
536 "include": "source.cpp"
537 }
538 ]
539 },
540 "code-block-console": {
541 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(console|shell|bash)\\s*$",
542 "while": "^\\1(?=\\s)|^\\s*$",
543 "beginCaptures": {
544 "2": {
545 "name": "keyword.control"
546 },
547 "4": {
548 "name": "variable.parameter.codeblock.console"
549 }
550 },
551 "patterns": [
552 {
553 "include": "#block-param"
554 },
555 {
556 "include": "source.shell"
557 }
558 ]
559 },
560 "code-block-py": {
561 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(python)\\s*$",
562 "while": "^\\1(?=\\s)|^\\s*$",
563 "beginCaptures": {
564 "2": {
565 "name": "keyword.control"
566 },
567 "4": {
568 "name": "variable.parameter.codeblock.py"
569 }
570 },
571 "patterns": [
572 {
573 "include": "#block-param"
574 },
575 {
576 "include": "source.python"
577 }
578 ]
579 },
580 "code-block-javascript": {
581 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(javascript)\\s*$",
582 "while": "^\\1(?=\\s)|^\\s*$",
583 "beginCaptures": {
584 "2": {
585 "name": "keyword.control"
586 },
587 "4": {
588 "name": "variable.parameter.codeblock.js"
589 }
590 },
591 "patterns": [
592 {
593 "include": "#block-param"
594 },
595 {
596 "include": "source.js"
597 }
598 ]
599 },
600 "code-block-yaml": {
601 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ya?ml)\\s*$",
602 "while": "^\\1(?=\\s)|^\\s*$",
603 "beginCaptures": {
604 "2": {
605 "name": "keyword.control"
606 },
607 "4": {
608 "name": "variable.parameter.codeblock.yaml"
609 }
610 },
611 "patterns": [
612 {
613 "include": "#block-param"
614 },
615 {
616 "include": "source.yaml"
617 }
618 ]
619 },
620 "code-block-cmake": {
621 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(cmake)\\s*$",
622 "while": "^\\1(?=\\s)|^\\s*$",
623 "beginCaptures": {
624 "2": {
625 "name": "keyword.control"
626 },
627 "4": {
628 "name": "variable.parameter.codeblock.cmake"
629 }
630 },
631 "patterns": [
632 {
633 "include": "#block-param"
634 },
635 {
636 "include": "source.cmake"
637 }
638 ]
639 },
640 "code-block-kconfig": {
641 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*([kK]config)\\s*$",
642 "while": "^\\1(?=\\s)|^\\s*$",
643 "beginCaptures": {
644 "2": {
645 "name": "keyword.control"
646 },
647 "4": {
648 "name": "variable.parameter.codeblock.kconfig"
649 }
650 },
651 "patterns": [
652 {
653 "include": "#block-param"
654 },
655 {
656 "include": "source.kconfig"
657 }
658 ]
659 },
660 "code-block-ruby": {
661 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ruby)\\s*$",
662 "while": "^\\1(?=\\s)|^\\s*$",
663 "beginCaptures": {
664 "2": {
665 "name": "keyword.control"
666 },
667 "4": {
668 "name": "variable.parameter.codeblock.ruby"
669 }
670 },
671 "patterns": [
672 {
673 "include": "#block-param"
674 },
675 {
676 "include": "source.ruby"
677 }
678 ]
679 },
680 "code-block-dts": {
681 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(dts|DTS|devicetree)\\s*$",
682 "while": "^\\1(?=\\s)|^\\s*$",
683 "beginCaptures": {
684 "2": {
685 "name": "keyword.control"
686 },
687 "4": {
688 "name": "variable.parameter.codeblock.dts"
689 }
690 },
691 "patterns": [
692 {
693 "include": "#block-param"
694 },
695 {
696 "include": "source.dts"
697 }
698 ]
699 },
700 "code-block": {
701 "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)",
702 "while": "^\\1(?=\\s)|^\\s*$",
703 "beginCaptures": {
704 "2": {
705 "name": "keyword.control"
706 }
707 },
708 "patterns": [
709 {
710 "include": "#block-param"
711 }
712 ]
713 },
714 "doctest-block": {
715 "begin": "^(\\s*)(\\.{2}\\s+doctest::)\\s*$",
716 "while": "^\\1(?=\\s)|^\\s*$",
717 "beginCaptures": {
718 "2": {
719 "name": "keyword.control"
720 }
721 },
722 "patterns": [
723 {
724 "include": "#block-param"
725 },
726 {
727 "include": "source.python"
728 }
729 ]
730 }
731 },
732 "name": "rst"
733 }
734