diff --git a/.gitmodules b/.gitmodules index c1da3247..7cc9e80d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -88,3 +88,6 @@ [submodule "assets/syntaxes/Crystal"] path = assets/syntaxes/Crystal url = https://github.com/crystal-lang-tools/sublime-crystal.git +[submodule "assets/syntaxes/PowerShell"] + path = assets/syntaxes/PowerShell + url = https://github.com/PowerShell/EditorSyntax diff --git a/assets/syntaxes/PowerShell b/assets/syntaxes/PowerShell new file mode 160000 index 00000000..12b7d725 --- /dev/null +++ b/assets/syntaxes/PowerShell @@ -0,0 +1 @@ +Subproject commit 12b7d7257eb493e45a9af0af9094ec0c2a996712 diff --git a/assets/syntaxes/PowerShell.sublime-syntax b/assets/syntaxes/PowerShell.sublime-syntax new file mode 100644 index 00000000..63488230 --- /dev/null +++ b/assets/syntaxes/PowerShell.sublime-syntax @@ -0,0 +1,466 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: PowerShell +file_extensions: + - ps1 + - psm1 + - psd1 +scope: source.powershell +contexts: + main: + - match: "<#" + captures: + 0: punctuation.definition.comment.block.begin.powershell + push: + - meta_scope: comment.block.powershell + - match: "#>" + captures: + 0: punctuation.definition.comment.block.end.powershell + pop: true + - include: commentEmbeddedDocs + - match: '[2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>>' + scope: keyword.operator.redirection.powershell + - include: commands + - include: commentLine + - include: variable + - include: interpolatedStringContent + - include: function + - include: attribute + - include: UsingDirective + - include: type + - include: hashtable + - include: doubleQuotedString + - include: scriptblock + - include: doubleQuotedStringEscapes + - match: (?