File tree 3 files changed +104
-0
lines changed
3 files changed +104
-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 >meta.fold.begin </string >
13
+ <key >end </key >
14
+ <string >meta.fold.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
+ <key >excludeTrailingNewlines </key >
22
+ <false />
23
+ </dict >
24
+ <dict >
25
+ <key >begin </key >
26
+ <string >string.quoted.double.heredoc punctuation.definition.string.begin </string >
27
+ <key >end </key >
28
+ <string >string.quoted.double.heredoc punctuation.definition.string.end </string >
29
+ <key >excludeTrailingNewlines </key >
30
+ <false />
31
+ </dict >
32
+ <dict >
33
+ <key >begin </key >
34
+ <string >string.quoted.single.heredoc punctuation.definition.string.begin </string >
35
+ <key >end </key >
36
+ <string >string.quoted.single.heredoc punctuation.definition.string.end </string >
37
+ <key >excludeTrailingNewlines </key >
38
+ <false />
39
+ </dict >
40
+ <dict >
41
+ <key >begin </key >
42
+ <string >punctuation.section.group.begin </string >
43
+ <key >end </key >
44
+ <string >punctuation.section.group.end </string >
45
+ <key >excludeTrailingNewlines </key >
46
+ <false />
47
+ </dict >
48
+ <dict >
49
+ <key >begin </key >
50
+ <string >punctuation.section.braces.begin </string >
51
+ <key >end </key >
52
+ <string >punctuation.section.braces.end </string >
53
+ <key >excludeTrailingNewlines </key >
54
+ <false />
55
+ </dict >
56
+ </array >
57
+ </dict >
58
+ </dict >
59
+ </plist >
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ contexts:
35
35
pop : true
36
36
37
37
main :
38
+ - include : regions
38
39
- include : comments
39
40
- include : expressions
40
41
@@ -808,3 +809,18 @@ contexts:
808
809
- match : (?=\()
809
810
pop : true
810
811
- include : comment-line
812
+
813
+ regions :
814
+ - match : ^\s*((#)\s*(region\b)(?:\s*(\S.*))?(\n?))
815
+ captures :
816
+ 1 : comment.line.powershell
817
+ 2 : punctuation.definition.comment.powershell
818
+ 3 : keyword.other.region.begin.powershell
819
+ 4 : meta.toc-list.powershell entity.name.section.powershell
820
+ 5 : meta.fold.begin.powershell
821
+ - match : ^\s*((#)\s*(endregion\b).*(\n?))
822
+ captures :
823
+ 1 : comment.line.powershell
824
+ 2 : punctuation.definition.comment.powershell
825
+ 3 : keyword.other.region.end.powershell
826
+ 4 : meta.fold.end.powershell
Original file line number Diff line number Diff line change @@ -469,6 +469,11 @@ There is no @platting here!
469
469
"@
470
470
# <- string.quoted.double.heredoc
471
471
# <- 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
472
477
473
478
# Numeric constants
474
479
@@ -1805,3 +1810,27 @@ function get-number {}
1805
1810
#<- comment.block comment.documentation.embedded punctuation.definition.keyword.documentation
1806
1811
#^^^^^^^^^^^^ keyword.other.documentation
1807
1812
#>
1813
+
1814
+ # region Test
1815
+ # <- punctuation.definition.comment
1816
+ # ^^^^^^ keyword.other.region.begin
1817
+ # <- comment.line.powershell
1818
+ # ^^^^ meta.toc-list entity.name.section
1819
+ # @@@@ local-definition
1820
+ # ^ meta.fold.begin
1821
+ # endregion (More comments)
1822
+ # <- punctuation.definition.comment.powershell
1823
+ # ^^^^^^^^^ keyword.other.region.end.powershell
1824
+ # <- comment.line
1825
+ # ^ meta.fold.end
1826
+
1827
+ # region
1828
+ # <- punctuation.definition.comment
1829
+ # ^^^^^^ keyword.other.region.begin
1830
+ # <- comment.line.powershell
1831
+ # ^ meta.fold.begin
1832
+ # endregion (More comments)
1833
+ # <- punctuation.definition.comment.powershell
1834
+ # ^^^^^^^^^ keyword.other.region.end.powershell
1835
+ # <- comment.line
1836
+ # ^ meta.fold.end
You can’t perform that action at this time.
0 commit comments