File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <plist version =" 1.0" >
3+ <dict >
4+ <key >scope </key >
5+ <string >source.powershell </string >
6+ <key >settings </key >
7+ <dict >
8+ <key >foldScopes </key >
9+ <array >
10+ <dict >
11+ <key >begin </key >
12+ <string >punctuation.section.block.begin </string >
13+ <key >end </key >
14+ <string >punctuation.section.block.end </string >
15+ </dict >
16+ <dict >
17+ <key >begin </key >
18+ <string >punctuation.definition.comment.block.begin </string >
19+ <key >end </key >
20+ <string >punctuation.definition.comment.block.end </string >
21+ </dict >
22+ <dict >
23+ <key >begin </key >
24+ <string >punctuation.definition.string.begin </string >
25+ <key >end </key >
26+ <string >punctuation.definition.string.end </string >
27+ </dict >
28+ </array >
29+ </dict >
30+ </dict >
31+ </plist >
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ contexts:
3535 pop : true
3636
3737 main :
38+ - include : regions
3839 - include : comments
3940 - include : expressions
4041
@@ -808,3 +809,17 @@ contexts:
808809 - match : (?=\()
809810 pop : true
810811 - include : comment-line
812+
813+ regions :
814+ - match : ^(#region\s*(.*))$
815+ captures :
816+ # Applying the punctuation.section.block.begin scope to the entire pattern
817+ # allows Sublime Text to show the region name when it is folded.
818+ 1 : punctuation.section.block.begin.powershell comment.line.powershell
819+ 2 : meta.toc-list.powershell
820+ - match : ^#endregion\b
821+ scope : punctuation.section.block.end.powershell comment.line.powershell
822+ push :
823+ - meta_content_scope : comment.line.powershell
824+ - include : pop-at-newline
825+ - include : comment-embedded-docs
Original file line number Diff line number Diff line change @@ -469,6 +469,11 @@ There is no @platting here!
469469"@
470470# <- string.quoted.double.heredoc
471471 # <- string.quoted.double.heredoc
472+ @'
473+ #<- meta.string string.quoted.single.heredoc punctuation.definition.string.begin
474+ A 'single quoted' "heredoc"
475+ '@
476+ # <- meta.string string.quoted.single.heredoc punctuation.definition.string.end
472477
473478# Numeric constants
474479
@@ -1805,3 +1810,11 @@ function get-number {}
18051810#<- comment.block comment.documentation.embedded punctuation.definition.keyword.documentation
18061811#^^^^^^^^^^^^ keyword.other.documentation
18071812#>
1813+
1814+ # region Test
1815+ # <- punctuation.section.block.begin comment.line
1816+ # ^^^^ meta.toc-list
1817+ # @@@@ local-definition
1818+ # endregion (Text after #endregion is optional, but the ISE marks it as a comment as well)
1819+ # <- punctuation.section.block.end comment.line
1820+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line
You can’t perform that action at this time.
0 commit comments