File tree 14 files changed +136
-12
lines changed
common/src/scopeSupportFacets
cursorless-vscode-e2e/src/suite
14 files changed +136
-12
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
12
12
"value.foreach" : supported ,
13
13
"type.foreach" : supported ,
14
14
15
+ "comment.line" : supported ,
16
+ "comment.block" : supported ,
17
+
15
18
element : notApplicable ,
16
19
tags : notApplicable ,
17
20
attribute : notApplicable ,
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
16
16
"argument.formal" : supportedLegacy ,
17
17
"argument.formal.iteration" : supportedLegacy ,
18
18
19
+ "comment.line" : supported ,
20
+ "comment.block" : supported ,
21
+
19
22
element : notApplicable ,
20
23
tags : notApplicable ,
21
24
attribute : notApplicable ,
Original file line number Diff line number Diff line change @@ -9,4 +9,7 @@ const { supported } = ScopeSupportFacetLevel;
9
9
10
10
export const talonScopeSupport : LanguageScopeSupportFacetMap = {
11
11
command : supported ,
12
+
13
+ "comment.line" : supported ,
14
+ "comment.block" : supported ,
12
15
} ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Hello world
3
+ */
4
+ ---
5
+
6
+ [Content] =
7
+ [Removal] =
8
+ [Domain] = 0:0-2:2
9
+ 0| /*
10
+ >--
11
+ 1| Hello world
12
+ -------------
13
+ 2| */
14
+ --<
15
+
16
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Hello world
3
+ */
4
+ ---
5
+
6
+ [Content] =
7
+ [Removal] =
8
+ [Domain] = 0:0-2:2
9
+ 0| /**
10
+ >---
11
+ 1| * Hello world
12
+ -------------
13
+ 2| */
14
+ --<
15
+
16
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ // Hello
2
+ // World
3
+ ---
4
+
5
+ [Content] =
6
+ [Removal] =
7
+ [Domain] = 0:0-1:8
8
+ 0| // Hello
9
+ >--------
10
+ 1| // World
11
+ --------<
12
+
13
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ // Hello world
2
+ ---
3
+
4
+ [Content] =
5
+ [Removal] =
6
+ [Domain] = 0:0-0:14
7
+ 0| // Hello world
8
+ >--------------<
9
+
10
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ // Hello
2
+ // World
3
+ ---
4
+
5
+ [Content] =
6
+ [Removal] =
7
+ [Domain] = 0:0-1:8
8
+ 0| // Hello
9
+ >--------
10
+ 1| // World
11
+ --------<
12
+
13
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ # Hello
2
+ # World
3
+ ---
4
+
5
+ [Content] =
6
+ [Removal] =
7
+ [Domain] = 0:0-1:7
8
+ 0| # Hello
9
+ >-------
10
+ 1| # World
11
+ -------<
12
+
13
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ # Hello world
2
+ ---
3
+
4
+ [Content] =
5
+ [Removal] =
6
+ [Domain] = 0:0-0:13
7
+ 0| # Hello world
8
+ >-------------<
9
+
10
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ # Hello
2
+ # World
3
+ ---
4
+
5
+ [Content] =
6
+ [Removal] =
7
+ [Domain] = 0:0-1:7
8
+ 0| # Hello
9
+ >-------
10
+ 1| # World
11
+ -------<
12
+
13
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
1
+ # Hello world
2
+ ---
3
+
4
+ [Content] =
5
+ [Removal] =
6
+ [Domain] = 0:0-0:13
7
+ 0| # Hello world
8
+ >-------------<
9
+
10
+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change @@ -145,19 +145,17 @@ function getScopeType(
145
145
scopeType : ScopeType ;
146
146
isIteration : boolean ;
147
147
} {
148
- if ( languageId === "textual" ) {
149
- const { scopeType , isIteration } =
150
- textualScopeSupportFacetInfos [ facetId as TextualScopeSupportFacet ] ;
151
- return {
152
- scopeType : { type : scopeType } ,
153
- isIteration : isIteration ?? false ,
154
- } ;
148
+ const facetInfo =
149
+ languageId === "textual"
150
+ ? textualScopeSupportFacetInfos [ facetId as TextualScopeSupportFacet ]
151
+ : scopeSupportFacetInfos [ facetId as ScopeSupportFacet ] ;
152
+
153
+ if ( facetInfo == null ) {
154
+ throw Error ( `Unknown facet ' ${ facetId } '` ) ;
155
155
}
156
156
157
- const { scopeType, isIteration } =
158
- scopeSupportFacetInfos [ facetId as ScopeSupportFacet ] ;
159
157
return {
160
- scopeType : { type : scopeType } ,
161
- isIteration : isIteration ?? false ,
158
+ scopeType : { type : facetInfo . scopeType } ,
159
+ isIteration : facetInfo . isIteration ?? false ,
162
160
} ;
163
161
}
Original file line number Diff line number Diff line change @@ -174,4 +174,7 @@ arguments: (_) @argumentOrParameter.iteration
174
174
175
175
; ;!! # foo
176
176
; ;! ^^^^^
177
- (comment) @comment
177
+ (
178
+ (comment) @comment
179
+ (#contiguous! @comment)
180
+ )
You can’t perform that action at this time.
0 commit comments