diff --git a/docs/content/documentation/content/syntax-highlighting.md b/docs/content/documentation/content/syntax-highlighting.md index bfb7f63..a824bf1 100644 --- a/docs/content/documentation/content/syntax-highlighting.md +++ b/docs/content/documentation/content/syntax-highlighting.md @@ -105,6 +105,7 @@ Here is a full list of the supported languages and the short names you can use: - Textile -> ["textile"] - XML -> ["xml", "xsd", "xslt", "tld", "dtml", "rss", "opml", "svg"] - YAML -> ["yaml", "yml", "sublime-syntax"] +- PowerShell -> ["ps1", "psm1", "psd1"] - SWI-Prolog -> ["pro"] - Reason -> ["re", "rei"] - CMake C Header -> ["h.in"] diff --git a/sublime_syntaxes/PowerShell.sublime-syntax b/sublime_syntaxes/PowerShell.sublime-syntax new file mode 100644 index 0000000..6348823 --- /dev/null +++ b/sublime_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: (?