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 11import { htmlScopeSupport } from "./html" ;
22import { javaScopeSupport } from "./java" ;
33import { javascriptScopeSupport } from "./javascript" ;
4+ import { jsonScopeSupport } from "./json" ;
45import { pythonScopeSupport } from "./python" ;
56import { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types" ;
67import { talonScopeSupport } from "./talon" ;
@@ -10,18 +11,20 @@ export function getLanguageScopeSupport(
1011 languageId : string ,
1112) : LanguageScopeSupportFacetMap {
1213 switch ( languageId ) {
13- case "javascript" :
14- return javascriptScopeSupport ;
15- case "typescript" :
16- return typescriptScopeSupport ;
14+ case "html" :
15+ return htmlScopeSupport ;
1716 case "java" :
1817 return javaScopeSupport ;
18+ case "javascript" :
19+ return javascriptScopeSupport ;
20+ case "json" :
21+ return jsonScopeSupport ;
1922 case "python" :
2023 return pythonScopeSupport ;
21- case "html" :
22- return htmlScopeSupport ;
2324 case "talon" :
2425 return talonScopeSupport ;
26+ case "typescript" :
27+ return typescriptScopeSupport ;
2528 }
2629 throw Error ( `Unsupported language: '${ languageId } '` ) ;
2730}
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 1414;; ! ^^^^^^^^
1515(string) @string
1616
17+ ;; !! // aaa
18+ ;; ! ^^^^^^
19+ ;; !! /* aaa */
20+ ;; ! ^^^^^^^^^
21+ (comment) @comment @textFragment
22+
1723;; !! {"value": 0}
1824;; ! ^^^^^^^ ^
1925;; ! ----------
Original file line number Diff line number Diff line change 11;; 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