File tree Expand file tree Collapse file tree 6 files changed +54
-9
lines changed
common/src/scopeSupportFacets
cursorless-vscode-e2e/src/suite/fixtures/scopes/json Expand file tree Collapse file tree 6 files changed +54
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { htmlScopeSupport } from "./html" ;
2
2
import { javaScopeSupport } from "./java" ;
3
3
import { javascriptScopeSupport } from "./javascript" ;
4
+ import { jsonScopeSupport } from "./json" ;
4
5
import { pythonScopeSupport } from "./python" ;
5
6
import { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types" ;
6
7
import { talonScopeSupport } from "./talon" ;
@@ -10,18 +11,20 @@ export function getLanguageScopeSupport(
10
11
languageId : string ,
11
12
) : LanguageScopeSupportFacetMap {
12
13
switch ( languageId ) {
13
- case "javascript" :
14
- return javascriptScopeSupport ;
15
- case "typescript" :
16
- return typescriptScopeSupport ;
14
+ case "html" :
15
+ return htmlScopeSupport ;
17
16
case "java" :
18
17
return javaScopeSupport ;
18
+ case "javascript" :
19
+ return javascriptScopeSupport ;
20
+ case "json" :
21
+ return jsonScopeSupport ;
19
22
case "python" :
20
23
return pythonScopeSupport ;
21
- case "html" :
22
- return htmlScopeSupport ;
23
24
case "talon" :
24
25
return talonScopeSupport ;
26
+ case "typescript" :
27
+ return typescriptScopeSupport ;
25
28
}
26
29
throw Error ( `Unsupported language: '${ languageId } '` ) ;
27
30
}
Original file line number Diff line number Diff line change
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+
3
+ import {
4
+ LanguageScopeSupportFacetMap ,
5
+ ScopeSupportFacetLevel ,
6
+ } from "./scopeSupportFacets.types" ;
7
+
8
+ const { supported } = ScopeSupportFacetLevel ;
9
+
10
+ export const jsonScopeSupport : LanguageScopeSupportFacetMap = {
11
+ "comment.line" : supported ,
12
+ "comment.block" : supported ,
13
+ } ;
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 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 14
14
;; ! ^^^^^^^^
15
15
(string) @string
16
16
17
+ ;; !! // aaa
18
+ ;; ! ^^^^^^
19
+ ;; !! /* aaa */
20
+ ;; ! ^^^^^^^^^
21
+ (comment) @comment @textFragment
22
+
17
23
;; !! {"value": 0}
18
24
;; ! ^^^^^^^ ^
19
25
;; ! ----------
Original file line number Diff line number Diff line change 1
1
; ; import json.scm
2
-
3
- ;; Currently not supported by our Tree sitter parser
4
- ;; (comment) @comment @textFragment
You can’t perform that action at this time.
0 commit comments