mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
VS Code Hangs When Opening Specific PowerShell File. Fixes #56430
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"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/PowerShell/EditorSyntax/commit/472c9447da4e3160bef211d5e1a0c2dee3cce497",
|
||||
"version": "https://github.com/PowerShell/EditorSyntax/commit/6f5438611c54922ea94c81532a2dcfee72190039",
|
||||
"name": "PowerShell",
|
||||
"scopeName": "source.powershell",
|
||||
"patterns": [
|
||||
@@ -71,17 +71,7 @@
|
||||
},
|
||||
{
|
||||
"begin": "(?<!')'",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.powershell"
|
||||
}
|
||||
},
|
||||
"end": "'(?!')",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.powershell"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.single.powershell",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -147,7 +137,7 @@
|
||||
"begin": "(\\$)(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.group.begin.powershell"
|
||||
@@ -180,20 +170,8 @@
|
||||
"name": "keyword.control.powershell"
|
||||
},
|
||||
{
|
||||
"begin": "(?<!\\w)(--%)(?!\\w)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.powershell"
|
||||
}
|
||||
},
|
||||
"end": "$",
|
||||
"patterns": [
|
||||
{
|
||||
"match": ".+",
|
||||
"name": "string.unquoted.powershell"
|
||||
}
|
||||
],
|
||||
"comment": "This should be moved to the repository at some point."
|
||||
"match": "(?<!\\w)(--%)(?!\\w)",
|
||||
"name": "keyword.control.powershell"
|
||||
},
|
||||
{
|
||||
"comment": "This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.",
|
||||
@@ -242,7 +220,7 @@
|
||||
},
|
||||
{
|
||||
"match": "\\|{2}|&{2}|;",
|
||||
"name": "punctuation.terminator.statement.powershell"
|
||||
"name": "keyword.other.statement-separator.powershell"
|
||||
},
|
||||
{
|
||||
"match": "&|(?<!\\w)\\.(?= )|`|,|\\|",
|
||||
@@ -262,7 +240,7 @@
|
||||
"name": "punctuation.definition.comment.powershell"
|
||||
}
|
||||
},
|
||||
"end": "$\\n?",
|
||||
"end": "$",
|
||||
"name": "comment.line.powershell",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -348,17 +326,7 @@
|
||||
},
|
||||
{
|
||||
"begin": "(?<!')'",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.powershell"
|
||||
}
|
||||
},
|
||||
"end": "'(?!')",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.powershell"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.single.powershell",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -411,7 +379,7 @@
|
||||
"name": "keyword.operator.documentation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "^(?i:(?:\\s*|#)+(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))",
|
||||
"match": "(?i:\\s*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))",
|
||||
"name": "comment.documentation.embedded.powershell"
|
||||
},
|
||||
{
|
||||
@@ -496,7 +464,7 @@
|
||||
"begin": "(\\$)(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.group.begin.powershell"
|
||||
@@ -649,11 +617,11 @@
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "constant.language.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "constant.language.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "These are special constants.",
|
||||
@@ -661,14 +629,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.variable.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "These are the other built-in constants.",
|
||||
@@ -676,14 +644,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.automatic.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.",
|
||||
@@ -691,14 +659,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.language.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "Style preference variables as language variables so that they stand out.",
|
||||
@@ -706,28 +674,25 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.scope.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.braces.begin.powershell"
|
||||
@@ -735,39 +700,39 @@
|
||||
"3": {
|
||||
"name": "storage.modifier.scope.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.section.braces.end.powershell"
|
||||
},
|
||||
"6": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.variable.drive.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$|@)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.braces.begin.powershell"
|
||||
@@ -775,11 +740,14 @@
|
||||
"3": {
|
||||
"name": "support.variable.drive.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.section.braces.end.powershell"
|
||||
},
|
||||
"6": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?"
|
||||
@@ -827,11 +795,11 @@
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "constant.language.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "constant.language.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "These are special constants.",
|
||||
@@ -839,14 +807,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.variable.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "These are the other built-in constants.",
|
||||
@@ -854,14 +822,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.variable.automatic.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "Automatic variables are not constants, but they are read-only...",
|
||||
@@ -869,14 +837,14 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"1": {
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.language.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"comment": "Style preference variables as language variables so that they stand out.",
|
||||
@@ -884,65 +852,62 @@
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.scope.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.scope.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.other.powershell"
|
||||
},
|
||||
"5": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.variable.drive.powershell"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.member.powershell"
|
||||
"name": "entity.name.function.invocation.powershell"
|
||||
}
|
||||
},
|
||||
"match": "(?i:(\\$)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"1": {
|
||||
"name": "punctuation.definition.variable.powershell"
|
||||
"name": "keyword.other.variable.definition.powershell"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.braces.begin"
|
||||
@@ -950,6 +915,9 @@
|
||||
"3": {
|
||||
"name": "support.variable.drive.powershell"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.other.readwrite.powershell"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.section.braces.end"
|
||||
}
|
||||
@@ -1004,17 +972,7 @@
|
||||
},
|
||||
"doubleQuotedString": {
|
||||
"begin": "(?<!(?<!`)\")\"",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.powershell"
|
||||
}
|
||||
},
|
||||
"end": "\"(?!\")",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.powershell"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.double.powershell",
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user