Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish adding scope support facet skeletons #2370

Merged
merged 8 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions data/fixtures/recorded/languages/css/changeComment.yml

This file was deleted.

24 changes: 0 additions & 24 deletions data/fixtures/recorded/languages/php/changeComment.yml

This file was deleted.

22 changes: 0 additions & 22 deletions data/fixtures/recorded/languages/scm/clearState2.yml

This file was deleted.

19 changes: 0 additions & 19 deletions data/fixtures/recorded/languages/scss/changeComment.yml

This file was deleted.

22 changes: 0 additions & 22 deletions data/fixtures/recorded/languages/scss/changeComment2.yml

This file was deleted.

10 changes: 10 additions & 0 deletions data/fixtures/scopes/json/map.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{"aaa": 0}
---

[Content] =
[Removal] =
[Domain] = 0:0-0:10
>----------<
0| {"aaa": 0}

[Insertion delimiter] = " "
3 changes: 3 additions & 0 deletions data/fixtures/scopes/jsonc/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"imports": ["json"]
}
3 changes: 3 additions & 0 deletions data/fixtures/scopes/jsonl/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"imports": ["json"]
}
20 changes: 20 additions & 0 deletions data/fixtures/scopes/jsonl/map.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{"aaa": 0}
{"bbb": 0}
---

[#1 Content] =
[#1 Removal] =
[#1 Domain] = 0:0-0:10
>----------<
0| {"aaa": 0}

[#1 Insertion delimiter] = " "


[#2 Content] =
[#2 Removal] =
[#2 Domain] = 1:0-1:10
>----------<
1| {"bbb": 0}

[#2 Insertion delimiter] = " "
19 changes: 19 additions & 0 deletions data/fixtures/scopes/php/comment.block.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/* Hello world! */
?>
---

[Content] =
[Domain] = 1:4-1:22
>------------------<
1| /* Hello world! */

[Removal] = 1:0-1:22
>----------------------<
1| /* Hello world! */

[Leading delimiter] = 1:0-1:4
>----<
1| /* Hello world! */

[Insertion delimiter] = "\n"
19 changes: 19 additions & 0 deletions data/fixtures/scopes/php/comment.line.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
// Hello world!
?>
---

[Content] =
[Domain] = 1:4-1:19
>---------------<
1| // Hello world!

[Removal] = 1:0-1:19
>-------------------<
1| // Hello world!

[Leading delimiter] = 1:0-1:4
>----<
1| // Hello world!

[Insertion delimiter] = "\n"
19 changes: 19 additions & 0 deletions data/fixtures/scopes/php/comment.line2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
# Hello world!
?>
---

[Content] =
[Domain] = 1:4-1:18
>--------------<
1| # Hello world!

[Removal] = 1:0-1:18
>------------------<
1| # Hello world!

[Leading delimiter] = 1:0-1:4
>----<
1| # Hello world!

[Insertion delimiter] = "\n"
10 changes: 10 additions & 0 deletions data/fixtures/scopes/scm/statement.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(aaa) @bbb
---

[Content] =
[Removal] =
[Domain] = 0:0-0:10
>----------<
0| (aaa) @bbb

[Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* foo */
// aaa
---

[Content] =
[Removal] =
[Domain] = 0:0-0:9
>---------<
0| /* foo */
[Domain] = 0:0-0:6
>------<
0| // aaa

[Insertion delimiter] = "\n"
3 changes: 3 additions & 0 deletions data/fixtures/scopes/scss/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"imports": ["css"]
}
10 changes: 10 additions & 0 deletions data/fixtures/scopes/xml/comment.block.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- aaa -->
---

[Content] =
[Removal] =
[Domain] = 0:0-0:12
>------------<
0| <!-- aaa -->

[Insertion delimiter] = "\n"
10 changes: 10 additions & 0 deletions data/fixtures/scopes/yaml/comment.line.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# aaa
---

[Content] =
[Removal] =
[Domain] = 0:0-0:5
>-----<
0| # aaa

[Insertion delimiter] = "\n"
2 changes: 1 addition & 1 deletion packages/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ export * from "./util/clientSupportsFallback";
export * from "./scopeSupportFacets/scopeSupportFacets.types";
export * from "./scopeSupportFacets/scopeSupportFacetInfos";
export * from "./scopeSupportFacets/textualScopeSupportFacetInfos";
export * from "./scopeSupportFacets/getLanguageScopeSupport";
export * from "./scopeSupportFacets/languageScopeSupport";
export * from "./StoredTargetKey";
3 changes: 2 additions & 1 deletion packages/common/src/scopeSupportFacets/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;

export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"comment.line": supported,
"comment.block": supported,
"string.singleLine": supported,

"comment.line": unsupported,
};

This file was deleted.

1 change: 1 addition & 0 deletions packages/common/src/scopeSupportFacets/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ const { supported } = ScopeSupportFacetLevel;
export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"comment.line": supported,
"comment.block": supported,
map: supported,
};
14 changes: 14 additions & 0 deletions packages/common/src/scopeSupportFacets/jsonl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */

import { jsonScopeSupport } from "./json";
import {
LanguageScopeSupportFacetMap,
ScopeSupportFacetLevel,
} from "./scopeSupportFacets.types";

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;

export const jsonlScopeSupport: LanguageScopeSupportFacetMap = {
...jsonScopeSupport,
};
Loading
Loading