Skip to content

Commit 6ed88dc

Browse files
Added code generation instruction setting four copilot
1 parent ef017c8 commit 6ed88dc

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
".busted": "lua"
2929
},
3030
"files.eol": "\n",
31+
"github.copilot.chat.codeGeneration.instructions": [
32+
{
33+
"file": "./packages/cursorless-org-docs/src/docs/contributing/scope-test-format.md"
34+
}
35+
],
3136
"typescript.enablePromptUseWorkspaceTsdk": true,
3237
"typescript.tsdk": "node_modules/typescript/lib",
3338
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts

packages/cursorless-org-docs/src/docs/contributing/scope-test-format.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,16 @@ We have a custom format we use to test that our scopes are correct. The format i
44

55
## Example
66

7-
Example of `.scope` file for the javascript if statement scope.
7+
Example of `.scope` file for the javascript statement scope.
88

99
```
10-
if (true) {
11-
12-
}
10+
const value = 0;
1311
---
14-
1512
[Content] =
1613
[Removal] =
17-
[Domain] = 0:0-2:1
18-
>-----------
19-
0| if (true) {
20-
1|
21-
2| }
22-
-<
14+
[Domain] = 0:0-0:16
15+
>----------------<
16+
0| const value = 0;
2317
2418
[Insertion delimiter] = "\n"
2519
```
@@ -46,14 +40,23 @@ A description of the different ranges and how they are used is available in our
4640

4741
### Scope ranges
4842

49-
The below example indicates that the content range, removal range, and domain range was the same. Line 0, column 0, to line 2, column 1. These ranges could also be different and in that case each show up as a separate range.
43+
The below example indicates that the content range, removal range, and domain range was the same. Line 0, column 0, to line 0, column 16.
5044

5145
```
5246
[Content] =
5347
[Removal] =
5448
[Domain] = 0:0-2:1
5549
```
5650

51+
These ranges could also be different and in that case each show up as a separate range.
52+
53+
```
54+
[Removal] =
55+
[Content] = 0:0-0:6
56+
57+
[Domain] = 0:0-2:1
58+
```
59+
5760
Each range is also visualized:
5861

5962
Single line range

0 commit comments

Comments
 (0)