PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.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
← All changes | build/shiki/languages/lua.tmLanguage.json +104 -7 1.9.21.13.0 View file →
@@ -3,9 +3,9 @@
3 3 "This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist",
4 4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 5 "Once accepted there, we are happy to receive an update request."
6 6 ],
7 - "version": "https://github.com/sumneko/lua.tmbundle/commit/bc74f9230c3f07c0ecc1bc1727ad98d9e70aff5b",
7 + "version": "https://github.com/sumneko/lua.tmbundle/commit/57be7c5cf8fa173f5f39806822725e503932ab45",
8 8 "name": "lua",
9 9 "scopeName": "source.lua",
10 10 "patterns": [
11 11 {
@@ -186,16 +186,20 @@
186 186 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*\\??:)",
187 187 "name": "entity.name.class.lua"
188 188 },
189 189 {
190 - "match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",
190 + "match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
191 191 "name": "entity.other.attribute.lua"
192 192 },
193 193 {
194 - "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
194 + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
195 195 "name": "variable.other.lua"
196 196 },
197 197 {
198 + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*=\\s*\\b(function)\\b)",
199 + "name": "entity.name.function.lua"
200 + },
201 + {
198 202 "match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|!=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
199 203 "name": "keyword.operator.lua"
200 204 }
201 205 ],
@@ -434,8 +438,28 @@
434 438 }
435 439 ]
436 440 },
437 441 {
442 + "begin": "(?<=---\\s*)@enum",
443 + "beginCaptures": {
444 + "0": {
445 + "name": "storage.type.annotation.lua"
446 + }
447 + },
448 + "end": "(?=[\\n@#])",
449 + "patterns": [
450 + {
451 + "begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
452 + "beginCaptures": {
453 + "0": {
454 + "name": "variable.lua"
455 + }
456 + },
457 + "end": "(?=\\n)"
458 + }
459 + ]
460 + },
461 + {
438 462 "begin": "(?<=---\\s*)@type",
439 463 "beginCaptures": {
440 464 "0": {
441 465 "name": "storage.type.annotation.lua"
@@ -463,12 +487,58 @@
463 487 "0": {
464 488 "name": "variable.lua"
465 489 }
466 490 },
491 + "end": "(?=[\\n#])",
492 + "patterns": [
493 + {
494 + "include": "#luadoc.type"
495 + }
496 + ]
497 + }
498 + ]
499 + },
500 + {
501 + "begin": "(?<=---\\s*)(@operator)\\s*(\\b[a-z]+)?",
502 + "beginCaptures": {
503 + "1": {
504 + "name": "storage.type.annotation.lua"
505 + },
506 + "2": {
507 + "name": "support.function.library.lua"
508 + }
509 + },
510 + "end": "(?=[\\n@#])",
511 + "patterns": [
512 + {
513 + "include": "#luadoc.type"
514 + }
515 + ]
516 + },
517 + {
518 + "begin": "(?<=---\\s*)@cast",
519 + "beginCaptures": {
520 + "0": {
521 + "name": "storage.type.annotation.lua"
522 + }
523 + },
524 + "end": "(?=[\\n@#])",
525 + "patterns": [
526 + {
527 + "begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
528 + "beginCaptures": {
529 + "0": {
530 + "name": "variable.other.lua"
531 + }
532 + },
467 533 "end": "(?=\\n)",
468 534 "patterns": [
469 535 {
470 536 "include": "#luadoc.type"
537 + },
538 + {
539 + "match": "([+-|])",
540 + "name": "keyword.operator.lua"
471 541 }
472 542 ]
473 543 }
474 544 ]
@@ -491,9 +561,9 @@
491 561 "2": {
492 562 "name": "keyword.operator.lua"
493 563 }
494 564 },
495 - "end": "(?=\\n)",
565 + "end": "(?=[\\n#])",
496 566 "patterns": [
497 567 {
498 568 "include": "#luadoc.type"
499 569 }
@@ -537,9 +607,9 @@
537 607 "3": {
538 608 "name": "keyword.operator.lua"
539 609 }
540 610 },
541 - "end": "(?=\\n)",
611 + "end": "(?=[\\n#])",
542 612 "patterns": [
543 613 {
544 614 "include": "#string"
545 615 },
@@ -634,8 +704,35 @@
634 704 },
635 705 "end": "(?=[\\n@#])"
636 706 },
637 707 {
708 + "begin": "(?<=---\\s*)@private",
709 + "beginCaptures": {
710 + "0": {
711 + "name": "storage.type.annotation.lua"
712 + }
713 + },
714 + "end": "(?=[\\n@#])"
715 + },
716 + {
717 + "begin": "(?<=---\\s*)@protected",
718 + "beginCaptures": {
719 + "0": {
720 + "name": "storage.type.annotation.lua"
721 + }
722 + },
723 + "end": "(?=[\\n@#])"
724 + },
725 + {
726 + "begin": "(?<=---\\s*)@package",
727 + "beginCaptures": {
728 + "0": {
729 + "name": "storage.type.annotation.lua"
730 + }
731 + },
732 + "end": "(?=[\\n@#])"
733 + },
734 + {
638 735 "begin": "(?<=---\\s*)@version",
639 736 "beginCaptures": {
640 737 "0": {
641 738 "name": "storage.type.annotation.lua"
@@ -747,9 +844,9 @@
747 844 "0": {
748 845 "name": "keyword.control.lua"
749 846 }
750 847 },
751 - "end": "(?=\\s)",
848 + "end": "(?=[\\s#])",
752 849 "patterns": [
753 850 {
754 851 "match": "[\\(\\),:\\?][ \\t]*",
755 852 "name": "keyword.operator.lua"
@@ -779,9 +876,9 @@
779 876 "name": "keyword.operator.lua"
780 877 },
781 878 {
782 879 "begin": "(?=[a-zA-Z_\\.\\*\"'\\[])",
783 - "end": "(?=[\\s\\)\\,\\?\\:\\}\\|])",
880 + "end": "(?=[\\s\\)\\,\\?\\:\\}\\|#])",
784 881 "patterns": [
785 882 {
786 883 "match": "([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?<!,)[ \\t]*",
787 884 "name": "support.type.lua"