diff --git a/packages/shiki/languages/ballerina.tmLanguage.json b/packages/shiki/languages/ballerina.tmLanguage.json index 97b0f09da..a37e6205b 100644 --- a/packages/shiki/languages/ballerina.tmLanguage.json +++ b/packages/shiki/languages/ballerina.tmLanguage.json @@ -2215,7 +2215,7 @@ }, { "name": "entity.service.path.ballerina", - "match": "(\\/([_$[:alpha:]][_$[:alnum:]]**)|\\\"[_$[:alpha:]][_$[:alnum:]]*\\\")" + "match": "(\\/([_$[:alpha:]][_$[:alnum:]]*)|\\\"[_$[:alpha:]][_$[:alnum:]]*\\\")" } ] }, @@ -3672,16 +3672,16 @@ "endCaptures": { "1": { "name": "punctuation.other.unicode-property.end.regexp.ballerina" + } + }, + "patterns": [ + { + "include": "#regex-unicode-properties-general-category" }, - "patterns": [ - { - "include": "#regex-unicode-properties-general-category" - }, - { - "include": "#regex-unicode-property-key" - } - ] - } + { + "include": "#regex-unicode-property-key" + } + ] } ] }, @@ -3699,13 +3699,13 @@ "endCaptures": { "1": { "name": "punctuation.other.unicode-property.end.regexp.ballerina" - }, - "patterns": [ - { - "include": "#regex-unicode-properties-general-category" - } - ] - } + } + }, + "patterns": [ + { + "include": "#regex-unicode-properties-general-category" + } + ] } ] }, @@ -3734,14 +3734,14 @@ "endCaptures": { "1": { "name": "punctuation.other.unicode-value.end.regexp.ballerina" - }, - "patterns": [ - { - "match": "([0-9A-Fa-f]{1,6})", - "name": "constant.other.unicode-value.regexp.ballerina" - } - ] - } + } + }, + "patterns": [ + { + "match": "([0-9A-Fa-f]{1,6})", + "name": "constant.other.unicode-value.regexp.ballerina" + } + ] } ] }, diff --git a/packages/shiki/languages/csharp.tmLanguage.json b/packages/shiki/languages/csharp.tmLanguage.json index a3a4eb102..7a0896219 100644 --- a/packages/shiki/languages/csharp.tmLanguage.json +++ b/packages/shiki/languages/csharp.tmLanguage.json @@ -206,9 +206,6 @@ { "include": "#else-part" }, - { - "include": "#switch-statement" - }, { "include": "#goto-statement" }, @@ -304,7 +301,7 @@ "include": "#language-variable" }, { - "include": "#switch-expression" + "include": "#switch-statement-or-expression" }, { "include": "#with-expression" @@ -312,6 +309,9 @@ { "include": "#conditional-operator" }, + { + "include": "#assignment-expression" + }, { "include": "#expression-operators" }, @@ -369,36 +369,39 @@ ] }, "extern-alias-directive": { - "begin": "\\s*(extern)\\b\\s*(alias)\\b\\s*(@?[_[:alpha:]][_[:alnum:]]*)", + "begin": "\\b(extern)\\s+(alias)\\b", "beginCaptures": { "1": { - "name": "keyword.other.extern.cs" + "name": "keyword.other.directive.extern.cs" }, "2": { - "name": "keyword.other.alias.cs" - }, - "3": { - "name": "variable.other.alias.cs" + "name": "keyword.other.directive.alias.cs" } }, - "end": "(?=;)" + "end": "(?=;)", + "patterns": [ + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "variable.other.alias.cs" + } + ] }, "using-directive": { "patterns": [ { - "begin": "(\\b(global)\\b\\s+)?\\b(using)\\b\\s+(static)\\b\\s+(\\b(unsafe)\\b\\s+)?", + "begin": "\\b(?:(global)\\s+)?(using)\\s+(static)\\b\\s*(?:(unsafe)\\b\\s*)?", "beginCaptures": { + "1": { + "name": "keyword.other.directive.global.cs" + }, "2": { - "name": "keyword.other.global.cs" + "name": "keyword.other.directive.using.cs" }, "3": { - "name": "keyword.other.using.cs" + "name": "keyword.other.directive.static.cs" }, "4": { - "name": "keyword.other.static.cs" - }, - "6": { - "name": "storage.modifier.cs" + "name": "storage.modifier.unsafe.cs" } }, "end": "(?=;)", @@ -409,19 +412,22 @@ ] }, { - "begin": "(\\b(global)\\b\\s+)?\\b(using)\\b\\s+(\\b(unsafe)\\b\\s+)?(?=(@?[_[:alpha:]][_[:alnum:]]*)\\s*=)", + "begin": "\\b(?:(global)\\s+)?(using)\\b\\s*(?:(unsafe)\\b\\s*)?(@?[_[:alpha:]][_[:alnum:]]*)\\s*(=)", "beginCaptures": { + "1": { + "name": "keyword.other.directive.global.cs" + }, "2": { - "name": "keyword.other.global.cs" + "name": "keyword.other.directive.using.cs" }, "3": { - "name": "keyword.other.using.cs" - }, - "5": { - "name": "storage.modifier.cs" + "name": "storage.modifier.unsafe.cs" }, - "6": { + "4": { "name": "entity.name.type.alias.cs" + }, + "5": { + "name": "keyword.operator.assignment.cs" } }, "end": "(?=;)", @@ -431,20 +437,17 @@ }, { "include": "#type" - }, - { - "include": "#operator-assignment" } ] }, { - "begin": "(\\b(global)\\b\\s+)?\\b(using)\\s*(?!\\(|\\s|var)", + "begin": "\\b(?:(global)\\s+)?(using)\\b\\s*+(?!\\(|var)", "beginCaptures": { - "2": { - "name": "keyword.other.global.cs" + "1": { + "name": "keyword.other.directive.global.cs" }, - "3": { - "name": "keyword.other.using.cs" + "2": { + "name": "keyword.other.directive.using.cs" } }, "end": "(?=;)", @@ -454,7 +457,10 @@ }, { "name": "entity.name.type.namespace.cs", - "match": "@?[_[:alpha:]][_[:alnum:]]*" + "match": "\\@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" }, { "include": "#operator-assignment" @@ -550,7 +556,7 @@ "begin": "\\b(namespace)\\s+", "beginCaptures": { "1": { - "name": "keyword.other.namespace.cs" + "name": "storage.type.namespace.cs" } }, "end": "(?<=\\})|(?=;)", @@ -593,7 +599,7 @@ ] }, "storage-modifier": { - "name": "storage.modifier.cs", + "name": "storage.modifier.$1.cs", "match": "(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { - "name": "keyword.other.delegate.cs" + "name": "storage.type.delegate.cs" }, "2": { "patterns": [ @@ -711,7 +717,7 @@ "match": "(enum)\\s+(@?[_[:alpha:]][_[:alnum:]]*)", "captures": { "1": { - "name": "keyword.other.enum.cs" + "name": "storage.type.enum.cs" }, "2": { "name": "entity.name.type.enum.cs" @@ -795,7 +801,7 @@ "begin": "(?x)\n(interface)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { - "name": "keyword.other.interface.cs" + "name": "storage.type.interface.cs" }, "2": { "name": "entity.name.type.interface.cs" @@ -852,7 +858,7 @@ "begin": "(?x)\n(record)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { - "name": "keyword.other.record.cs" + "name": "storage.type.record.cs" }, "2": { "name": "entity.name.type.class.cs" @@ -912,10 +918,10 @@ "begin": "(?x)\n(\\b(record)\\b\\s+)?\n(struct)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "2": { - "name": "keyword.other.record.cs" + "name": "storage.type.record.cs" }, "3": { - "name": "keyword.other.struct.cs" + "name": "storage.type.struct.cs" }, "4": { "name": "entity.name.type.struct.cs" @@ -983,19 +989,11 @@ "patterns": [ { "match": "\\b(in|out)\\b", - "captures": { - "1": { - "name": "storage.modifier.cs" - } - } + "name": "storage.modifier.$1.cs" }, { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", - "captures": { - "1": { - "name": "entity.name.type.type-parameter.cs" - } - } + "name": "entity.name.type.type-parameter.cs" }, { "include": "#comment" @@ -1032,7 +1030,7 @@ "begin": "(where)\\s+(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", "beginCaptures": { "1": { - "name": "keyword.other.where.cs" + "name": "storage.modifier.where.cs" }, "2": { "name": "entity.name.type.type-parameter.cs" @@ -1044,18 +1042,18 @@ "end": "(?=\\{|where|;|=>)", "patterns": [ { - "name": "keyword.other.class.cs", + "name": "storage.type.class.cs", "match": "\\bclass\\b" }, { - "name": "keyword.other.struct.cs", + "name": "storage.type.struct.cs", "match": "\\bstruct\\b" }, { "match": "(new)\\s*(\\()\\s*(\\))", "captures": { "1": { - "name": "keyword.other.new.cs" + "name": "keyword.operator.expression.new.cs" }, "2": { "name": "punctuation.parenthesis.open.cs" @@ -1200,7 +1198,7 @@ "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s* # first event name\n(?=\\{|;|,|=|//|/\\*|$)", "beginCaptures": { "1": { - "name": "keyword.other.event.cs" + "name": "storage.type.event.cs" }, "2": { "patterns": [ @@ -1278,14 +1276,14 @@ "include": "#attribute-section" }, { - "name": "storage.modifier.cs", + "name": "storage.modifier.$1.cs", "match": "\\b(private|protected|internal)\\b" }, { "begin": "\\b(get)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", "beginCaptures": { "1": { - "name": "keyword.other.$1.cs" + "name": "storage.type.accessor.$1.cs" } }, "end": "(?<=\\}|;)|(?=\\})", @@ -1299,7 +1297,7 @@ "begin": "\\b(set|init)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", "beginCaptures": { "1": { - "name": "keyword.other.$1.cs" + "name": "storage.type.accessor.$1.cs" } }, "end": "(?<=\\}|;)|(?=\\})", @@ -1335,7 +1333,7 @@ "begin": "\\b(add|remove)\\b\\s*(?=\\{|;|=>|//|/\\*|$)", "beginCaptures": { "1": { - "name": "keyword.other.$1.cs" + "name": "storage.type.accessor.$1.cs" } }, "end": "(?<=\\}|;)|(?=\\})", @@ -1584,7 +1582,7 @@ ] }, "6": { - "name": "keyword.other.operator-decl.cs" + "name": "storage.type.operator.cs" }, "7": { "name": "entity.name.function.cs" @@ -1615,7 +1613,7 @@ "match": "\\b(explicit)\\b", "captures": { "1": { - "name": "keyword.other.explicit.cs" + "name": "storage.modifier.explicit.cs" } } }, @@ -1623,14 +1621,14 @@ "match": "\\b(implicit)\\b", "captures": { "1": { - "name": "keyword.other.implicit.cs" + "name": "storage.modifier.implicit.cs" } } } ] }, "2": { - "name": "keyword.other.operator-decl.cs" + "name": "storage.type.operator.cs" }, "3": { "patterns": [ @@ -1713,7 +1711,7 @@ "begin": "(?", "beginCaptures": { "0": { - "name": "punctuation.curlybrace.open.cs" + "name": "keyword.operator.arrow.cs" } }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.curlybrace.close.cs" + "end": "(?=,|})", + "patterns": [ + { + "include": "#expression" + } + ] + }, + { + "begin": "\\b(when)\\b", + "beginCaptures": { + "1": { + "name": "keyword.control.conditional.when.cs" } }, + "end": "(?==>|,|})", "patterns": [ { - "include": "#comment" - }, - { - "include": "#literal" - }, - { - "include": "#switch-var-pattern" - }, - { - "include": "#switch-property-expression" - }, - { - "include": "#member-access-expression" - }, - { - "include": "#switch-pattern" - }, - { - "include": "#expression-body" - }, + "include": "#case-guard" + } + ] + }, + { + "begin": "(?!\\s)", + "end": "(?=\\bwhen\\b|=>|,|})", + "patterns": [ { - "include": "#punctuation-comma" + "include": "#pattern" } ] } ] }, - "with-expression": { - "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\b\\s*", + "combinator-pattern": { + "match": "\\b(and|or|not)\\b", + "name": "keyword.operator.expression.pattern.combinator.$1.cs" + }, + "discard-pattern": { + "match": "_(?![_[:alnum:]])", + "name": "variable.language.discard.cs" + }, + "constant-pattern": { + "patterns": [ + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#char-literal" + }, + { + "include": "#string-literal" + }, + { + "include": "#raw-string-literal" + }, + { + "include": "#verbatim-string-literal" + }, + { + "include": "#typeof-or-default-expression" + }, + { + "include": "#nameof-expression" + }, + { + "include": "#expression-operators" + }, + { + "include": "#casted-constant-pattern" + } + ] + }, + "casted-constant-pattern": { + "begin": "(?x)\n(\\()\n ([\\s.:@_[:alnum:]]+)\n(\\))\n(?=[\\s+\\-!~]*@?[_[:alnum:]('\"]+)", "beginCaptures": { "1": { + "name": "punctuation.parenthesis.open.cs" + }, + "2": { "patterns": [ { - "include": "#type" + "include": "#type-builtin" + }, + { + "include": "#type-name" } ] }, - "2": { - "name": "entity.name.variable.local.cs" + "3": { + "name": "punctuation.parenthesis.close.cs" } }, - "end": "(?==>)", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", "patterns": [ { - "include": "#comment" + "include": "#casted-constant-pattern" }, { - "include": "#switch-when-clause" + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#constant-pattern" + } + ] + }, + { + "include": "#constant-pattern" + }, + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\:\\:)", + "captures": { + "1": { + "name": "entity.name.type.alias.cs" + }, + "2": { + "name": "punctuation.separator.coloncolon.cs" + } + } + }, + { + "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)", + "captures": { + "1": { + "name": "entity.name.type.cs" + }, + "2": { + "name": "punctuation.accessor.cs" + } + } + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "variable.other.constant.cs" + } + ] + }, + "relational-pattern": { + "begin": "<=?|>=?", + "beginCaptures": { + "0": { + "name": "keyword.operator.relational.cs" + } + }, + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#expression" } ] }, - "switch-property-expression": { - "begin": "(?x) # e.g. int x OR var x\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(\\{)", + "var-pattern": { + "begin": "\\b(var)\\b", "beginCaptures": { "1": { + "name": "storage.type.var.cs" + } + }, + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#designation-pattern" + } + ] + }, + "designation-pattern": { + "patterns": [ + { + "include": "#intrusive" + }, + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, "patterns": [ { - "include": "#type" + "include": "#punctuation-comma" + }, + { + "include": "#designation-pattern" } ] }, - "6": { - "name": "punctuation.curlybrace.open.cs" + { + "include": "#simple-designation-pattern" } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.curlybrace.close.cs" + ] + }, + "simple-designation-pattern": { + "patterns": [ + { + "include": "#discard-pattern" + }, + { + "match": "@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.variable.local.cs" } - }, + ] + }, + "type-pattern": { + "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*)", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", "patterns": [ { - "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", - "captures": { + "begin": "\\G", + "end": "(?!\\G[@_[:alpha:]])(?=[\\({@_[:alpha:])}\\],;:=&|^]|(?:\\s|^)\\?|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#type-subpattern" + } + ] + }, + { + "begin": "(?=[\\({@_[:alpha:]])", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#positional-pattern" + }, + { + "include": "#property-pattern" + }, + { + "include": "#simple-designation-pattern" + } + ] + } + ] + }, + "type-subpattern": { + "patterns": [ + { + "include": "#type-builtin" + }, + { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(::)", + "beginCaptures": { "1": { - "name": "variable.other.object.property.cs" + "name": "entity.name.type.alias.cs" }, "2": { - "name": "punctuation.separator.colon.cs" + "name": "punctuation.separator.coloncolon.cs" } - } + }, + "end": "(?<=[_[:alnum:]])|(?=[.<\\[\\({)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + } + ] + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + }, + { + "begin": "\\.", + "beginCaptures": { + "0": { + "name": "punctuation.accessor.cs" + } + }, + "end": "(?<=[_[:alnum:]])|(?=[<\\[\\({)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "entity.name.type.cs" + } + ] + }, + { + "include": "#type-arguments" }, { - "include": "#expression" + "include": "#type-array-suffix" }, { - "include": "#punctuation-comma" + "match": "(?\\((?:[^\\(\\)]|\\g)+\\))\\s*", - "beginCaptures": { - "1": { - "name": "keyword.other.var.cs" + "positional-pattern": { + "begin": "(?=\\()", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.cs" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.cs" + } + }, + "patterns": [ + { + "include": "#subpattern" + }, + { + "include": "#punctuation-comma" + } + ] }, - "2": { + { + "begin": "(?<=\\))", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", "patterns": [ { - "include": "#tuple-declaration-deconstruction-element-list" + "include": "#intrusive" + }, + { + "include": "#property-pattern" + }, + { + "include": "#simple-designation-pattern" } ] } - }, - "end": "(?==>)", + ] + }, + "property-pattern": { + "begin": "(?={)", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", "patterns": [ { - "include": "#comment" + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.cs" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.cs" + } + }, + "patterns": [ + { + "include": "#subpattern" + }, + { + "include": "#punctuation-comma" + } + ] }, { - "include": "#switch-when-clause" + "begin": "(?<=\\})", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", + "patterns": [ + { + "include": "#intrusive" + }, + { + "include": "#simple-designation-pattern" + } + ] } ] }, - "switch-when-clause": { - "begin": "(?)", + "subpattern": { "patterns": [ { - "include": "#comment" - }, - { - "include": "#expression" - }, - { - "include": "#punctuation-comma" - }, - { - "match": "\\(", + "match": "(@?[_[:alpha:]][_[:alnum:]]*(?:\\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*)*)\\s*(:)", "captures": { - "0": { - "name": "punctuation.parenthesis.open.cs" + "1": { + "patterns": [ + { + "match": "\\@?[_[:alpha:]][_[:alnum:]]*", + "name": "variable.other.object.property.cs" + }, + { + "include": "#punctuation-accessor" + } + ] + }, + "2": { + "name": "punctuation.separator.colon.cs" } } }, { - "match": "\\)", - "captures": { - "0": { - "name": "punctuation.parenthesis.close.cs" - } - } + "include": "#pattern" } ] }, - "switch-label": { + "list-pattern": { + "begin": "(?=\\[)", + "end": "(?=[)}\\],;:?=&|^]|!=|\\b(and|or|when)\\b)", "patterns": [ { - "begin": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", "captures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "2": { "patterns": [ @@ -2313,7 +2691,7 @@ "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s+\n\\b(in)\\b", "captures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "2": { "patterns": [ @@ -2354,7 +2732,7 @@ "begin": "(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))", "beginCaptures": { "1": { - "name": "keyword.other.using.cs" + "name": "keyword.control.context.using.cs" }, "2": { - "name": "storage.modifier.cs" + "name": "storage.modifier.ref.cs" }, "3": { - "name": "storage.modifier.cs" + "name": "storage.modifier.readonly.cs" }, "4": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "5": { "patterns": [ @@ -2623,7 +3001,7 @@ "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { - "name": "storage.modifier.cs" + "name": "storage.modifier.const.cs" }, "2": { "patterns": [ @@ -2704,7 +3082,7 @@ "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?=;|=|\\))", "beginCaptures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "2": { "patterns": [ @@ -2812,7 +3190,7 @@ "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)\\]])", "captures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "2": { "patterns": [ @@ -2830,7 +3208,7 @@ "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.type.var.cs" }, "2": { "patterns": [ @@ -2845,15 +3223,12 @@ } }, "checked-unchecked-expression": { - "begin": "(?>>?|\\|)?=(?!=|>)", + "beginCaptures": { + "0": { + "patterns": [ + { + "include": "#assignment-operators" + } + ] + } + }, + "end": "(?=[,\\)\\];}])", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "assignment-operators": { "patterns": [ { "name": "keyword.operator.assignment.compound.cs", @@ -3570,6 +3963,14 @@ "name": "keyword.operator.assignment.compound.bitwise.cs", "match": "\\&=|\\^=|<<=|>>>?=|\\|=" }, + { + "name": "keyword.operator.assignment.cs", + "match": "\\=" + } + ] + }, + "expression-operators": { + "patterns": [ { "name": "keyword.operator.bitwise.shift.cs", "match": "<<|>>>?" @@ -3590,10 +3991,6 @@ "name": "keyword.operator.bitwise.cs", "match": "\\&|~|\\^|\\|" }, - { - "name": "keyword.operator.assignment.cs", - "match": "\\=" - }, { "name": "keyword.operator.decrement.cs", "match": "--" @@ -3616,23 +4013,20 @@ } ] }, - "switch-literal": { - "name": "constant.language.null.cs", - "match": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?(?!\\?))? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n \\s*(?:,\\s*)* # commata for multi-dimensional arrays\n \\]\n (?:\\s*\\?(?!\\?))? # arrays can be nullable reference types\n )*\n )\n)?", "captures": { "1": { - "name": "keyword.other.as.cs" - }, - "2": { - "patterns": [ - { - "include": "#type" - } - ] - } - } - }, - "is-expression": { - "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?", - "captures": { - "1": { - "name": "keyword.other.is.cs" + "name": "keyword.operator.expression.as.cs" }, "2": { "patterns": [ @@ -3874,7 +4253,7 @@ "begin": "(?x)\n(new)(?:\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n))?\\s*\n(?=\\()", "beginCaptures": { "1": { - "name": "keyword.other.new.cs" + "name": "keyword.operator.expression.new.cs" }, "2": { "patterns": [ @@ -3895,7 +4274,7 @@ "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|//|/\\*|$)", "captures": { "1": { - "name": "keyword.other.new.cs" + "name": "keyword.operator.expression.new.cs" }, "2": { "patterns": [ @@ -3910,7 +4289,7 @@ "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { - "name": "keyword.other.new.cs" + "name": "keyword.operator.expression.$1.cs" }, "2": { "patterns": [ @@ -3931,7 +4310,7 @@ "begin": "\\b(new)\\b\\s*(?=\\{|//|/\\*|$)", "beginCaptures": { "1": { - "name": "keyword.other.new.cs" + "name": "keyword.operator.expression.new.cs" } }, "end": "(?<=\\})", @@ -4016,7 +4395,7 @@ "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)", "captures": { "1": { - "name": "storage.modifier.cs" + "name": "storage.modifier.$1.cs" }, "2": { "patterns": [ @@ -4100,14 +4479,14 @@ "argument": { "patterns": [ { - "name": "storage.modifier.cs", + "name": "storage.modifier.$1.cs", "match": "\\b(ref|in)\\b" }, { "begin": "\\b(out)\\b", "beginCaptures": { "1": { - "name": "storage.modifier.cs" + "name": "storage.modifier.out.cs" } }, "end": "(?=,|\\)|\\])", @@ -4129,7 +4508,7 @@ "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.from.cs" + "name": "keyword.operator.expression.query.from.cs" }, "2": { "patterns": [ @@ -4142,7 +4521,7 @@ "name": "entity.name.variable.range-variable.cs" }, "8": { - "name": "keyword.query.in.cs" + "name": "keyword.operator.expression.query.in.cs" } }, "end": "(?=;|\\))", @@ -4181,7 +4560,7 @@ "begin": "(?x)\n\\b(let)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=)\\s*", "beginCaptures": { "1": { - "name": "keyword.query.let.cs" + "name": "keyword.operator.expression.query.let.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" @@ -4204,7 +4583,7 @@ "begin": "(?x)\n\\b(where)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.where.cs" + "name": "keyword.operator.expression.query.where.cs" } }, "end": "(?=;|\\))", @@ -4221,7 +4600,7 @@ "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.join.cs" + "name": "keyword.operator.expression.query.join.cs" }, "2": { "patterns": [ @@ -4234,7 +4613,7 @@ "name": "entity.name.variable.range-variable.cs" }, "8": { - "name": "keyword.query.in.cs" + "name": "keyword.operator.expression.query.in.cs" } }, "end": "(?=;|\\))", @@ -4260,7 +4639,7 @@ "match": "\\b(on)\\b\\s*", "captures": { "1": { - "name": "keyword.query.on.cs" + "name": "keyword.operator.expression.query.on.cs" } } }, @@ -4268,7 +4647,7 @@ "match": "\\b(equals)\\b\\s*", "captures": { "1": { - "name": "keyword.query.equals.cs" + "name": "keyword.operator.expression.query.equals.cs" } } }, @@ -4276,7 +4655,7 @@ "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", "captures": { "1": { - "name": "keyword.query.into.cs" + "name": "keyword.operator.expression.query.into.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" @@ -4287,7 +4666,7 @@ "begin": "\\b(orderby)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.orderby.cs" + "name": "keyword.operator.expression.query.orderby.cs" } }, "end": "(?=;|\\))", @@ -4307,13 +4686,10 @@ ] }, "ordering-direction": { - "match": "\\b(?:(ascending)|(descending))\\b", + "match": "\\b(ascending|descending)\\b", "captures": { "1": { - "name": "keyword.query.ascending.cs" - }, - "2": { - "name": "keyword.query.descending.cs" + "name": "keyword.operator.expression.query.$1.cs" } } }, @@ -4321,7 +4697,7 @@ "begin": "\\b(select)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.select.cs" + "name": "keyword.operator.expression.query.select.cs" } }, "end": "(?=;|\\))", @@ -4338,7 +4714,7 @@ "begin": "\\b(group)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.query.group.cs" + "name": "keyword.operator.expression.query.group.cs" } }, "end": "(?=;|\\))", @@ -4361,7 +4737,7 @@ "match": "\\b(by)\\b\\s*", "captures": { "1": { - "name": "keyword.query.by.cs" + "name": "keyword.operator.expression.query.by.cs" } } }, @@ -4369,7 +4745,7 @@ "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", "captures": { "1": { - "name": "keyword.query.into.cs" + "name": "keyword.operator.expression.query.into.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" @@ -4379,10 +4755,15 @@ "anonymous-method-expression": { "patterns": [ { - "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)", + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)", "beginCaptures": { "1": { - "name": "storage.modifier.cs" + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] }, "2": { "name": "entity.name.variable.parameter.cs" @@ -4405,10 +4786,15 @@ ] }, { - "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(\\(.*?\\))\\s*\n(=>)", + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?\n \\(\n (?:[^()]|\\g)*\n \\)\n)\\s*\n(=>)", "beginCaptures": { "1": { - "name": "storage.modifier.cs" + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] }, "2": { "patterns": [ @@ -4435,13 +4821,18 @@ ] }, { - "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(?:\\b(delegate)\\b\\s*)", + "begin": "(?x)\n((?:\\b(?:async|static)\\b\\s*)*)\n(?:\\b(delegate)\\b\\s*)", "beginCaptures": { "1": { - "name": "storage.modifier.cs" + "patterns": [ + { + "match": "async|static", + "name": "storage.modifier.$0.cs" + } + ] }, "2": { - "name": "keyword.other.delegate.cs" + "name": "storage.type.delegate.cs" } }, "end": "(?=\\)|;|}|,)", @@ -4451,9 +4842,6 @@ }, { "include": "#block" - }, - { - "include": "#expression" } ] } @@ -4491,7 +4879,7 @@ "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { - "name": "storage.modifier.cs" + "name": "storage.modifier.$1.cs" }, "2": { "patterns": [ @@ -4506,7 +4894,6 @@ } }, "type": { - "name": "meta.type.cs", "patterns": [ { "include": "#comment" @@ -4538,12 +4925,12 @@ ] }, "ref-modifier": { - "name": "storage.modifier.cs", - "match": "\\b(ref)\\b" + "name": "storage.modifier.ref.cs", + "match": "\\bref\\b" }, "readonly-modifier": { - "name": "storage.modifier.cs", - "match": "\\b(readonly)\\b" + "name": "storage.modifier.readonly.cs", + "match": "\\breadonly\\b" }, "tuple-type": { "begin": "\\(", @@ -4586,7 +4973,7 @@ "match": "\\b(bool|s?byte|u?short|n?u?int|u?long|float|double|decimal|char|string|object|void|dynamic)\\b", "captures": { "1": { - "name": "keyword.type.cs" + "name": "keyword.type.$1.cs" } } }, @@ -4645,9 +5032,6 @@ } }, "patterns": [ - { - "include": "#comment" - }, { "include": "#type" }, @@ -4670,6 +5054,9 @@ } }, "patterns": [ + { + "include": "#intrusive" + }, { "include": "#punctuation-comma" } @@ -4699,6 +5086,16 @@ "name": "punctuation.accessor.cs", "match": "\\." }, + "intrusive": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + } + ] + }, "preprocessor": { "name": "meta.preprocessor.cs", "begin": "^\\s*(\\#)\\s*", @@ -5004,38 +5401,47 @@ "comment": { "patterns": [ { - "name": "comment.block.cs", - "begin": "/\\*", - "beginCaptures": { - "0": { + "name": "comment.block.documentation.cs", + "begin": "(^\\s+)?(///)(?!/)", + "while": "^(\\s*)(///)(?!/)", + "captures": { + "1": { + "name": "punctuation.whitespace.comment.leading.cs" + }, + "2": { "name": "punctuation.definition.comment.cs" } }, - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.cs" + "patterns": [ + { + "include": "#xml-doc-comment" } - } + ] }, { - "begin": "(^\\s+)?(?=//)", - "beginCaptures": { + "name": "comment.block.documentation.cs", + "begin": "(^\\s+)?(/\\*\\*)(?!/)", + "end": "(^\\s+)?(\\*/)", + "captures": { "1": { "name": "punctuation.whitespace.comment.leading.cs" + }, + "2": { + "name": "punctuation.definition.comment.cs" } }, - "end": "(?=$)", "patterns": [ { - "name": "comment.block.documentation.cs", - "begin": "(?>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", - "captures": { - "1": { - "name": "keyword.control.flow.python" - } - } - }, "statement-keyword": { "patterns": [ { @@ -280,7 +132,7 @@ } }, { - "match": "\\b(var|let|alias|owned|borrowed|inout) \\s*([[:alpha:]_]\\w*)\\b", + "match": "\\b(var|let|alias) \\s*([[:alpha:]_]\\w*)\\b", "captures": { "1": { "name": "storage.modifier.declaration.python" @@ -1161,6 +1013,10 @@ }, "contentName": "meta.function.lambda.parameters.python", "patterns": [ + { + "name": "storage.modifier", + "match": "\\b(owned|borrowed|inout)\\b" + }, { "name": "keyword.operator.positional.parameter.python", "match": "/" @@ -1276,6 +1132,9 @@ } }, "patterns": [ + { + "include": "#raises-modifier" + }, { "include": "#function-def-name" }, @@ -1307,6 +1166,10 @@ } ] }, + "raises-modifier": { + "name": "storage.modifier", + "match": "(raises)" + }, "parameters": { "name": "meta.function.parameters.python", "begin": "(\\()", @@ -1322,6 +1185,10 @@ } }, "patterns": [ + { + "name": "storage.modifier", + "match": "\\b(owned|borrowed|inout)\\b" + }, { "name": "keyword.operator.positional.parameter.python", "match": "/" diff --git a/packages/shiki/languages/tex.tmLanguage.json b/packages/shiki/languages/tex.tmLanguage.json index dd44356c8..29f4ebe60 100644 --- a/packages/shiki/languages/tex.tmLanguage.json +++ b/packages/shiki/languages/tex.tmLanguage.json @@ -1,12 +1,5 @@ { - "information_for_contributors": [ - "This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/TeX.tmLanguage.json", - "If you want to provide a fix or improvement, please create a pull request against the original repository.", - "Once accepted there, we are happy to receive an update request." - ], - "version": "https://github.com/jlelong/vscode-latex-basics/commit/3ae82b457c28f0368cbbb47024b0245ef1ff3d33", "name": "tex", - "scopeName": "text.tex", "patterns": [ { "captures": { @@ -282,5 +275,6 @@ } ] } - } + }, + "scopeName": "text.tex" } diff --git a/packages/shiki/src/__tests__/__snapshots__/issues.test.ts.snap b/packages/shiki/src/__tests__/__snapshots__/issues.test.ts.snap index 5034e02b4..3d9c46bdc 100644 --- a/packages/shiki/src/__tests__/__snapshots__/issues.test.ts.snap +++ b/packages/shiki/src/__tests__/__snapshots__/issues.test.ts.snap @@ -322,6 +322,7 @@ Array [ "meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown", + "variable.legacy.builtin.python", ], "settings": Object { "foreground": "#000000ff", diff --git a/packages/shiki/src/languages.ts b/packages/shiki/src/languages.ts index cfe43d53a..cfa4cc5bf 100644 --- a/packages/shiki/src/languages.ts +++ b/packages/shiki/src/languages.ts @@ -201,7 +201,8 @@ export const languages: ILanguageRegistration[] = [ id: 'apache', scopeName: 'source.apacheconf', path: 'apache.tmLanguage.json', - displayName: 'Apache Conf' + displayName: 'Apache Conf', + samplePath: 'apache.sample' }, { id: 'apex', @@ -215,6 +216,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.apl', path: 'apl.tmLanguage.json', displayName: 'APL', + samplePath: 'apl.sample', embeddedLangs: ['html', 'xml', 'css', 'javascript', 'json'] }, { @@ -287,7 +289,8 @@ export const languages: ILanguageRegistration[] = [ id: 'bibtex', scopeName: 'text.bibtex', path: 'bibtex.tmLanguage.json', - displayName: 'BibTeX' + displayName: 'BibTeX', + samplePath: 'bibtex.sample' }, { id: 'bicep', @@ -451,7 +454,8 @@ export const languages: ILanguageRegistration[] = [ id: 'dream-maker', scopeName: 'source.dm', path: 'dream-maker.tmLanguage.json', - displayName: 'Dream Maker' + displayName: 'Dream Maker', + samplePath: 'dream-maker.sample' }, { id: 'elixir', @@ -527,7 +531,8 @@ export const languages: ILanguageRegistration[] = [ id: 'gherkin', scopeName: 'text.gherkin.feature', path: 'gherkin.tmLanguage.json', - displayName: 'Gherkin' + displayName: 'Gherkin', + samplePath: 'gherkin.sample' }, { id: 'git-commit', @@ -571,7 +576,8 @@ export const languages: ILanguageRegistration[] = [ id: 'gnuplot', scopeName: 'source.gnuplot', path: 'gnuplot.tmLanguage.json', - displayName: 'Gnuplot' + displayName: 'Gnuplot', + samplePath: 'gnuplot.sample' }, { id: 'go', @@ -585,19 +591,22 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.graphql', path: 'graphql.tmLanguage.json', displayName: 'GraphQL', + samplePath: 'graphql.sample', embeddedLangs: ['javascript', 'typescript', 'jsx', 'tsx'] }, { id: 'groovy', scopeName: 'source.groovy', path: 'groovy.tmLanguage.json', - displayName: 'Groovy' + displayName: 'Groovy', + samplePath: 'groovy.sample' }, { id: 'hack', scopeName: 'source.hack', path: 'hack.tmLanguage.json', displayName: 'Hack', + samplePath: 'hack.sample', embeddedLangs: ['html', 'sql'] }, { @@ -605,6 +614,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.haml', path: 'haml.tmLanguage.json', displayName: 'Ruby Haml', + samplePath: 'haml.sample', embeddedLangs: ['ruby', 'javascript', 'sass', 'coffee', 'markdown', 'css'] }, { @@ -612,6 +622,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.html.handlebars', path: 'handlebars.tmLanguage.json', displayName: 'Handlebars', + samplePath: 'handlebars.sample', aliases: ['hbs'], embeddedLangs: ['html', 'css', 'javascript', 'yaml'] }, @@ -620,6 +631,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.haskell', path: 'haskell.tmLanguage.json', displayName: 'Haskell', + samplePath: 'haskell.sample', aliases: ['hs'] }, { @@ -640,7 +652,8 @@ export const languages: ILanguageRegistration[] = [ id: 'hlsl', scopeName: 'source.hlsl', path: 'hlsl.tmLanguage.json', - displayName: 'HLSL' + displayName: 'HLSL', + samplePath: 'hlsl.sample' }, { id: 'html', @@ -670,6 +683,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.ini', path: 'ini.tmLanguage.json', displayName: 'INI', + samplePath: 'ini.sample', aliases: ['properties'] }, { @@ -692,6 +706,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.html.jinja', path: 'jinja-html.tmLanguage.json', displayName: 'Jinja', + samplePath: 'jinja-html.sample', embeddedLangs: ['html'] }, { @@ -706,7 +721,8 @@ export const languages: ILanguageRegistration[] = [ id: 'json', scopeName: 'source.json', path: 'json.tmLanguage.json', - displayName: 'JSON' + displayName: 'JSON', + samplePath: 'json.sample' }, { id: 'json5', @@ -719,19 +735,22 @@ export const languages: ILanguageRegistration[] = [ id: 'jsonc', scopeName: 'source.json.comments', path: 'jsonc.tmLanguage.json', - displayName: 'JSON with Comments' + displayName: 'JSON with Comments', + samplePath: 'jsonc.sample' }, { id: 'jsonl', scopeName: 'source.json.lines', path: 'jsonl.tmLanguage.json', - displayName: 'JSON Lines' + displayName: 'JSON Lines', + samplePath: 'jsonl.sample' }, { id: 'jsonnet', scopeName: 'source.jsonnet', path: 'jsonnet.tmLanguage.json', - displayName: 'Jsonnet' + displayName: 'Jsonnet', + samplePath: 'jsonnet.sample' }, { id: 'jssm', @@ -745,13 +764,15 @@ export const languages: ILanguageRegistration[] = [ id: 'jsx', scopeName: 'source.js.jsx', path: 'jsx.tmLanguage.json', - displayName: 'JSX' + displayName: 'JSX', + samplePath: 'jsx.sample' }, { id: 'julia', scopeName: 'source.julia', path: 'julia.tmLanguage.json', displayName: 'Julia', + samplePath: 'julia.sample', embeddedLangs: ['cpp', 'python', 'javascript', 'r', 'sql'] }, { @@ -774,6 +795,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.tex.latex', path: 'latex.tmLanguage.json', displayName: 'LaTeX', + samplePath: 'latex.sample', embeddedLangs: ['tex', 'css', 'haskell', 'html', 'xml', 'java', 'lua', 'julia', 'ruby', 'javascript', 'typescript', 'python', 'yaml', 'rust', 'scala', 'gnuplot'] }, { @@ -781,6 +803,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.css.less', path: 'less.tmLanguage.json', displayName: 'Less', + samplePath: 'less.sample', embeddedLangs: ['css'] }, { @@ -795,19 +818,22 @@ export const languages: ILanguageRegistration[] = [ id: 'lisp', scopeName: 'source.lisp', path: 'lisp.tmLanguage.json', - displayName: 'Lisp' + displayName: 'Lisp', + samplePath: 'lisp.sample' }, { id: 'logo', scopeName: 'source.logo', path: 'logo.tmLanguage.json', - displayName: 'Logo' + displayName: 'Logo', + samplePath: 'logo.sample' }, { id: 'lua', scopeName: 'source.lua', path: 'lua.tmLanguage.json', displayName: 'Lua', + samplePath: 'lua.sample', embeddedLangs: ['c'] }, { @@ -815,6 +841,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.makefile', path: 'make.tmLanguage.json', displayName: 'Makefile', + samplePath: 'make.sample', aliases: ['makefile'] }, { @@ -822,6 +849,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.html.markdown', path: 'markdown.tmLanguage.json', displayName: 'Markdown', + samplePath: 'markdown.sample', aliases: ['md'], embeddedLangs: ['css', 'html', 'ini', 'java', 'lua', 'make', 'perl', 'r', 'ruby', 'php', 'sql', 'vb', 'xml', 'xsl', 'yaml', 'bat', 'clojure', 'coffee', 'c', 'cpp', 'diff', 'docker', 'git-commit', 'git-rebase', 'go', 'groovy', 'pug', 'javascript', 'json', 'jsonc', 'less', 'objective-c', 'swift', 'scss', 'raku', 'powershell', 'python', 'julia', 'rust', 'scala', 'shellscript', 'typescript', 'tsx', 'csharp', 'fsharp', 'dart', 'handlebars', 'erlang', 'elixir', 'latex', 'bibtex'] }, @@ -837,20 +865,23 @@ export const languages: ILanguageRegistration[] = [ id: 'matlab', scopeName: 'source.matlab', path: 'matlab.tmLanguage.json', - displayName: 'MATLAB' + displayName: 'MATLAB', + samplePath: 'matlab.sample' }, { id: 'mdx', scopeName: 'source.mdx', path: 'mdx.tmLanguage.json', displayName: 'MDX', + samplePath: 'mdx.sample', embeddedLangs: ['tsx', 'toml', 'yaml', 'c', 'clojure', 'coffee', 'cpp', 'csharp', 'css', 'diff', 'docker', 'elixir', 'elm', 'erlang', 'go', 'graphql', 'haskell', 'html', 'ini', 'java', 'javascript', 'json', 'julia', 'kotlin', 'less', 'lua', 'make', 'markdown', 'objective-c', 'perl', 'python', 'r', 'ruby', 'rust', 'scala', 'scss', 'shellscript', 'shellsession', 'sql', 'xml', 'swift', 'typescript'] }, { id: 'mermaid', scopeName: 'source.mermaid', path: 'mermaid.tmLanguage.json', - displayName: 'Mermaid' + displayName: 'Mermaid', + samplePath: 'mermaid.sample' }, { id: 'mojo', @@ -880,6 +911,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.nginx', path: 'nginx.tmLanguage.json', displayName: 'Nginx', + samplePath: 'nginx.sample', embeddedLangs: ['lua'] }, { @@ -887,44 +919,51 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.nim', path: 'nim.tmLanguage.json', displayName: 'Nim', + samplePath: 'nim.sample', embeddedLangs: ['c', 'html', 'xml', 'javascript', 'css', 'glsl', 'markdown'] }, { id: 'nix', scopeName: 'source.nix', path: 'nix.tmLanguage.json', - displayName: 'Nix' + displayName: 'Nix', + samplePath: 'nix.sample' }, { id: 'objective-c', scopeName: 'source.objc', path: 'objective-c.tmLanguage.json', displayName: 'Objective-C', + samplePath: 'objective-c.sample', aliases: ['objc'] }, { id: 'objective-cpp', scopeName: 'source.objcpp', path: 'objective-cpp.tmLanguage.json', - displayName: 'Objective-C++' + displayName: 'Objective-C++', + samplePath: 'objective-cpp.sample' }, { id: 'ocaml', scopeName: 'source.ocaml', path: 'ocaml.tmLanguage.json', - displayName: 'OCaml' + displayName: 'OCaml', + samplePath: 'ocaml.sample' }, { id: 'pascal', scopeName: 'source.pascal', path: 'pascal.tmLanguage.json', - displayName: 'Pascal' + displayName: 'Pascal', + samplePath: 'pascal.sample' }, { id: 'perl', scopeName: 'source.perl', path: 'perl.tmLanguage.json', displayName: 'Perl', + samplePath: 'perl.sample', embeddedLangs: ['html', 'xml', 'css', 'javascript', 'sql'] }, { @@ -932,19 +971,22 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.php', path: 'php.tmLanguage.json', displayName: 'PHP', + samplePath: 'php.sample', embeddedLangs: ['html', 'xml', 'sql', 'javascript', 'json', 'css'] }, { id: 'plsql', scopeName: 'source.plsql.oracle', path: 'plsql.tmLanguage.json', - displayName: 'PL/SQL' + displayName: 'PL/SQL', + samplePath: 'plsql.sample' }, { id: 'postcss', scopeName: 'source.css.postcss', path: 'postcss.tmLanguage.json', - displayName: 'PostCSS' + displayName: 'PostCSS', + samplePath: 'postcss.sample' }, { id: 'powerquery', @@ -958,6 +1000,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.powershell', path: 'powershell.tmLanguage.json', displayName: 'PowerShell', + samplePath: 'powershell.sample', aliases: ['ps', 'ps1'] }, { @@ -971,7 +1014,8 @@ export const languages: ILanguageRegistration[] = [ id: 'prolog', scopeName: 'source.prolog', path: 'prolog.tmLanguage.json', - displayName: 'Prolog' + displayName: 'Prolog', + samplePath: 'prolog.sample' }, { id: 'proto', @@ -985,6 +1029,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.pug', path: 'pug.tmLanguage.json', displayName: 'Pug', + samplePath: 'pug.sample', aliases: ['jade'], embeddedLangs: ['javascript', 'css', 'sass', 'scss', 'stylus', 'coffee', 'html'] }, @@ -992,13 +1037,15 @@ export const languages: ILanguageRegistration[] = [ id: 'puppet', scopeName: 'source.puppet', path: 'puppet.tmLanguage.json', - displayName: 'Puppet' + displayName: 'Puppet', + samplePath: 'puppet.sample' }, { id: 'purescript', scopeName: 'source.purescript', path: 'purescript.tmLanguage.json', - displayName: 'PureScript' + displayName: 'PureScript', + samplePath: 'purescript.sample' }, { id: 'python', @@ -1012,13 +1059,15 @@ export const languages: ILanguageRegistration[] = [ id: 'r', scopeName: 'source.r', path: 'r.tmLanguage.json', - displayName: 'R' + displayName: 'R', + samplePath: 'r.sample' }, { id: 'raku', scopeName: 'source.perl.6', path: 'raku.tmLanguage.json', displayName: 'Perl 6', + samplePath: 'raku.sample', aliases: ['perl6'] }, { @@ -1026,6 +1075,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.aspnetcorerazor', path: 'razor.tmLanguage.json', displayName: 'ASP.NET Razor', + samplePath: 'razor.sample', embeddedLangs: ['html', 'csharp'] }, { @@ -1046,13 +1096,15 @@ export const languages: ILanguageRegistration[] = [ id: 'riscv', scopeName: 'source.riscv', path: 'riscv.tmLanguage.json', - displayName: 'RISC-V' + displayName: 'RISC-V', + samplePath: 'riscv.sample' }, { id: 'rst', scopeName: 'source.rst', path: 'rst.tmLanguage.json', displayName: 'reStructuredText', + samplePath: 'rst.sample', embeddedLangs: ['cpp', 'python', 'javascript', 'shellscript', 'yaml', 'cmake', 'ruby'] }, { @@ -1069,6 +1121,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.rust', path: 'rust.tmLanguage.json', displayName: 'Rust', + samplePath: 'rust.sample', aliases: ['rs'] }, { @@ -1076,31 +1129,36 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.sas', path: 'sas.tmLanguage.json', displayName: 'SAS', + samplePath: 'sas.sample', embeddedLangs: ['sql'] }, { id: 'sass', scopeName: 'source.sass', path: 'sass.tmLanguage.json', - displayName: 'Sass' + displayName: 'Sass', + samplePath: 'sass.sample' }, { id: 'scala', scopeName: 'source.scala', path: 'scala.tmLanguage.json', - displayName: 'Scala' + displayName: 'Scala', + samplePath: 'scala.sample' }, { id: 'scheme', scopeName: 'source.scheme', path: 'scheme.tmLanguage.json', - displayName: 'Scheme' + displayName: 'Scheme', + samplePath: 'scheme.sample' }, { id: 'scss', scopeName: 'source.css.scss', path: 'scss.tmLanguage.json', displayName: 'SCSS', + samplePath: 'scss.sample', embeddedLangs: ['css'] }, { @@ -1108,6 +1166,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.shaderlab', path: 'shaderlab.tmLanguage.json', displayName: 'ShaderLab', + samplePath: 'shaderlab.sample', aliases: ['shader'], embeddedLangs: ['hlsl'] }, @@ -1116,6 +1175,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.shell', path: 'shellscript.tmLanguage.json', displayName: 'Shell', + samplePath: 'shellscript.sample', aliases: ['bash', 'sh', 'shell', 'zsh'] }, { @@ -1131,13 +1191,15 @@ export const languages: ILanguageRegistration[] = [ id: 'smalltalk', scopeName: 'source.smalltalk', path: 'smalltalk.tmLanguage.json', - displayName: 'Smalltalk' + displayName: 'Smalltalk', + samplePath: 'smalltalk.sample' }, { id: 'solidity', scopeName: 'source.solidity', path: 'solidity.tmLanguage.json', - displayName: 'Solidity' + displayName: 'Solidity', + samplePath: 'solidity.sample' }, { id: 'sparql', @@ -1159,13 +1221,15 @@ export const languages: ILanguageRegistration[] = [ id: 'sql', scopeName: 'source.sql', path: 'sql.tmLanguage.json', - displayName: 'SQL' + displayName: 'SQL', + samplePath: 'sql.sample' }, { id: 'ssh-config', scopeName: 'source.ssh-config', path: 'ssh-config.tmLanguage.json', - displayName: 'SSH Config' + displayName: 'SSH Config', + samplePath: 'ssh-config.sample' }, { id: 'stata', @@ -1180,6 +1244,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.stylus', path: 'stylus.tmLanguage.json', displayName: 'Stylus', + samplePath: 'stylus.sample', aliases: ['styl'] }, { @@ -1187,19 +1252,22 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.svelte', path: 'svelte.tmLanguage.json', displayName: 'Svelte', + samplePath: 'svelte.sample', embeddedLangs: ['javascript', 'typescript', 'coffee', 'stylus', 'sass', 'css', 'scss', 'less', 'postcss', 'pug', 'markdown'] }, { id: 'swift', scopeName: 'source.swift', path: 'swift.tmLanguage.json', - displayName: 'Swift' + displayName: 'Swift', + samplePath: 'swift.sample' }, { id: 'system-verilog', scopeName: 'source.systemverilog', path: 'system-verilog.tmLanguage.json', - displayName: 'SystemVerilog' + displayName: 'SystemVerilog', + samplePath: 'system-verilog.sample' }, { id: 'tasl', @@ -1212,20 +1280,23 @@ export const languages: ILanguageRegistration[] = [ id: 'tcl', scopeName: 'source.tcl', path: 'tcl.tmLanguage.json', - displayName: 'Tcl' + displayName: 'Tcl', + samplePath: 'tcl.sample' }, { id: 'tex', scopeName: 'text.tex', path: 'tex.tmLanguage.json', displayName: 'TeX', + samplePath: 'tex.sample', embeddedLangs: ['r'] }, { id: 'toml', scopeName: 'source.toml', path: 'toml.tmLanguage.json', - displayName: 'TOML' + displayName: 'TOML', + samplePath: 'toml.sample' }, { id: 'tsx', @@ -1246,6 +1317,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.html.twig', path: 'twig.tmLanguage.json', displayName: 'Twig', + samplePath: 'twig.sample', embeddedLangs: ['css', 'javascript', 'php', 'python', 'ruby'] }, { @@ -1253,6 +1325,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.ts', path: 'typescript.tmLanguage.json', displayName: 'TypeScript', + samplePath: 'typescript.sample', aliases: ['ts'] }, { @@ -1267,25 +1340,29 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.asp.vb.net', path: 'vb.tmLanguage.json', displayName: 'Visual Basic', + samplePath: 'vb.sample', aliases: ['cmd'] }, { id: 'verilog', scopeName: 'source.verilog', path: 'verilog.tmLanguage.json', - displayName: 'Verilog' + displayName: 'Verilog', + samplePath: 'verilog.sample' }, { id: 'vhdl', scopeName: 'source.vhdl', path: 'vhdl.tmLanguage.json', - displayName: 'VHDL' + displayName: 'VHDL', + samplePath: 'vhdl.sample' }, { id: 'viml', scopeName: 'source.viml', path: 'viml.tmLanguage.json', displayName: 'Vim Script', + samplePath: 'viml.sample', aliases: ['vim', 'vimscript'] }, { @@ -1293,6 +1370,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.html.vue-html', path: 'vue-html.tmLanguage.json', displayName: 'Vue HTML', + samplePath: 'vue-html.sample', embeddedLangs: ['vue', 'javascript'] }, { @@ -1300,6 +1378,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.vue', path: 'vue.tmLanguage.json', displayName: 'Vue', + samplePath: 'vue.sample', embeddedLangs: ['html', 'markdown', 'pug', 'stylus', 'sass', 'css', 'scss', 'less', 'javascript', 'typescript', 'jsx', 'tsx', 'json', 'jsonc', 'json5', 'yaml', 'toml', 'graphql'] }, { @@ -1314,13 +1393,15 @@ export const languages: ILanguageRegistration[] = [ id: 'wasm', scopeName: 'source.wat', path: 'wasm.tmLanguage.json', - displayName: 'WebAssembly' + displayName: 'WebAssembly', + samplePath: 'wasm.sample' }, { id: 'wenyan', scopeName: 'source.wenyan', path: 'wenyan.tmLanguage.json', displayName: 'Wenyan', + samplePath: 'wenyan.sample', aliases: ['文言'] }, { @@ -1342,6 +1423,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.xml', path: 'xml.tmLanguage.json', displayName: 'XML', + samplePath: 'xml.sample', embeddedLangs: ['java'] }, { @@ -1349,6 +1431,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'text.xml.xsl', path: 'xsl.tmLanguage.json', displayName: 'XSL', + samplePath: 'xsl.sample', embeddedLangs: ['xml'] }, { @@ -1356,6 +1439,7 @@ export const languages: ILanguageRegistration[] = [ scopeName: 'source.yaml', path: 'yaml.tmLanguage.json', displayName: 'YAML', + samplePath: 'yaml.sample', aliases: ['yml'] }, { diff --git a/packages/shiki/themes/dark-plus.json b/packages/shiki/themes/dark-plus.json index ba2fabdcb..98847f3c8 100644 --- a/packages/shiki/themes/dark-plus.json +++ b/packages/shiki/themes/dark-plus.json @@ -8,7 +8,12 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], "settings": { "foreground": "#D4D4D4" } diff --git a/packages/shiki/themes/hc_light.json b/packages/shiki/themes/hc_light.json index 090add5ee..349e90fa5 100644 --- a/packages/shiki/themes/hc_light.json +++ b/packages/shiki/themes/hc_light.json @@ -3,7 +3,7 @@ "name": "hc_light", "tokenColors": [ { - "scope": ["meta.embedded", "source.groovy.embedded"], + "scope": ["meta.embedded", "source.groovy.embedded", "variable.legacy.builtin.python"], "settings": { "foreground": "#292929" } diff --git a/packages/shiki/themes/light-plus.json b/packages/shiki/themes/light-plus.json index 59e2be507..833b7f748 100644 --- a/packages/shiki/themes/light-plus.json +++ b/packages/shiki/themes/light-plus.json @@ -8,7 +8,12 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], "settings": { "foreground": "#000000ff" } diff --git a/packages/shiki/themes/material-theme-darker.json b/packages/shiki/themes/material-theme-darker.json index f09dd4891..16966b64b 100644 --- a/packages/shiki/themes/material-theme-darker.json +++ b/packages/shiki/themes/material-theme-darker.json @@ -705,6 +705,7 @@ "sideBarTitle.foreground": "#EEFFFF", "sideBarSectionHeader.border": "#21212160", "panel.dropBackground": "#EEFFFF", + "sash.hoverBorder": "#80CBC450", "panelTitle.activeForeground": "#FFFFFF", "editor.lineHighlightBackground": "#00000050", "editor.findMatchBackground": "#000000", diff --git a/packages/shiki/themes/material-theme-lighter.json b/packages/shiki/themes/material-theme-lighter.json index 9a2b208cd..e168cc35b 100644 --- a/packages/shiki/themes/material-theme-lighter.json +++ b/packages/shiki/themes/material-theme-lighter.json @@ -705,6 +705,7 @@ "sideBarTitle.foreground": "#90A4AE", "sideBarSectionHeader.border": "#FAFAFA60", "panel.dropBackground": "#90A4AE", + "sash.hoverBorder": "#80CBC450", "panelTitle.activeForeground": "#000000", "editor.lineHighlightBackground": "#CCD7DA50", "editor.findMatchBackground": "#00000020", diff --git a/packages/shiki/themes/material-theme-ocean.json b/packages/shiki/themes/material-theme-ocean.json index 0d4f284dc..6c84a3b14 100644 --- a/packages/shiki/themes/material-theme-ocean.json +++ b/packages/shiki/themes/material-theme-ocean.json @@ -705,6 +705,7 @@ "sideBarTitle.foreground": "#babed8", "sideBarSectionHeader.border": "#0F111A60", "panel.dropBackground": "#babed8", + "sash.hoverBorder": "#80CBC450", "panelTitle.activeForeground": "#FFFFFF", "editor.lineHighlightBackground": "#00000050", "editor.findMatchBackground": "#000000", diff --git a/packages/shiki/themes/material-theme-palenight.json b/packages/shiki/themes/material-theme-palenight.json index 52619681f..49ba53bfb 100644 --- a/packages/shiki/themes/material-theme-palenight.json +++ b/packages/shiki/themes/material-theme-palenight.json @@ -705,6 +705,7 @@ "sideBarTitle.foreground": "#babed8", "sideBarSectionHeader.border": "#292D3E60", "panel.dropBackground": "#babed8", + "sash.hoverBorder": "#80CBC450", "panelTitle.activeForeground": "#FFFFFF", "editor.lineHighlightBackground": "#00000050", "editor.findMatchBackground": "#000000", diff --git a/packages/shiki/themes/material-theme.json b/packages/shiki/themes/material-theme.json index 3dcc26006..57f2ec5a3 100644 --- a/packages/shiki/themes/material-theme.json +++ b/packages/shiki/themes/material-theme.json @@ -632,7 +632,7 @@ "tab.unfocusedInactiveModifiedBorder": "#904348", "editor.background": "#263238", "editor.foreground": "#EEFFFF", - "editorLineNumber.foreground": "#37474F", + "editorLineNumber.foreground": "#465A64", "editorLineNumber.activeForeground": "#607a86", "editorCursor.foreground": "#FFCC00", "editor.selectionBackground": "#80CBC420", @@ -705,6 +705,7 @@ "sideBarTitle.foreground": "#EEFFFF", "sideBarSectionHeader.border": "#26323860", "panel.dropBackground": "#EEFFFF", + "sash.hoverBorder": "#80CBC450", "panelTitle.activeForeground": "#FFFFFF", "editor.lineHighlightBackground": "#00000050", "editor.findMatchBackground": "#000000", diff --git a/packages/shiki/themes/monokai.json b/packages/shiki/themes/monokai.json index 941e08a5e..3829ff3a4 100644 --- a/packages/shiki/themes/monokai.json +++ b/packages/shiki/themes/monokai.json @@ -102,7 +102,12 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], "settings": { "foreground": "#F8F8F2" } diff --git a/packages/shiki/themes/solarized-dark.json b/packages/shiki/themes/solarized-dark.json index 17630be1f..646d3f8fc 100644 --- a/packages/shiki/themes/solarized-dark.json +++ b/packages/shiki/themes/solarized-dark.json @@ -7,7 +7,12 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], "settings": { "foreground": "#839496" } diff --git a/packages/shiki/themes/solarized-light.json b/packages/shiki/themes/solarized-light.json index 8481af2c4..9283f3e0e 100644 --- a/packages/shiki/themes/solarized-light.json +++ b/packages/shiki/themes/solarized-light.json @@ -7,7 +7,12 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], "settings": { "foreground": "#657B83" }