You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This implicitly requires `vscode-tree-sitter-query` to be published to
the Open VSX Registry to not cause issues when running tests, as rn that
plugin is commented out in
`packages/common/src/extensionDependencies.ts` due to it not being
present there. This PR will therefor need to be a draft until that
plugin is uploaded to Open VSX; I'll probably also add to the
documentation to note the differences in commands between VSCodium and
VSCode at some point soon. There's also probably a cleaner way to do
this with a variable passed to
`packages/cursorless-vscode/src/scripts/initLaunchSandbox.ts` to swap
between vscode and vscodium mode or something, but I'll look into that
later as well.
---------
Co-authored-by: Andreas Arvidsson <[email protected]>
Copy file name to clipboardExpand all lines: packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.mdx
+55-19Lines changed: 55 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
+
importTabsfrom"@theme/Tabs";
2
+
importTabItemfrom"@theme/TabItem";
3
+
1
4
# Contributing
2
5
3
-
Welcome! So glad you've decided to help make Cursorless better. You'll want to start by getting [set up](#initial-setup) and learning how to [run / test a local copy of the
4
-
extension](#running--testing-extension-locally). You may also find the [VSCode API docs](https://code.visualstudio.com/api) helpful to learn about VSCode extension development.
6
+
Welcome! So glad you've decided to help make Cursorless better. You'll want to start by getting [set up](#initial-setup) and learning how to [run / test a local copy of the extension](#running--testing-extension-locally). You may also find the [VSCode API docs](https://code.visualstudio.com/api) helpful to learn about VSCode extension development.
5
7
6
8
## Initial setup
7
9
@@ -10,7 +12,8 @@ extension](#running--testing-extension-locally). You may also find the [VSCode A
10
12
-[Git](https://git-scm.com/)
11
13
-[Node.js](https://nodejs.org/en/)
12
14
-[Corepack](https://nodejs.org/api/corepack.html) or [pnpm](https://pnpm.io/installation)
13
-
-[VSCode](https://code.visualstudio.com/); minimum version for local development is 1.72.0 in order to support settings profiles for sandboxed development. Please file an issue if that is a problem.
15
+
-[VSCode](https://code.visualstudio.com/) or [VSCodium](https://vscodium.com/)
16
+
Both VSCode and VSCodium will be referred to as VSCode except when instructions differ between the editors.
14
17
15
18
### Steps
16
19
@@ -23,25 +26,52 @@ extension](#running--testing-extension-locally). You may also find the [VSCode A
23
26
pnpm compile
24
27
```
25
28
26
-
4. Run
29
+
4. Run the following in the terminal:
27
30
28
-
```bash
29
-
code --profile=cursorlessDevelopment
30
-
```
31
+
<TabsgroupId="vsx">
32
+
<TabItemvalue="vscode"label="VSCode"default>
33
+
`bash code --profile=cursorlessDevelopment`
34
+
</TabItem>
35
+
<TabItemvalue="vscodium"label="VSCodium">
36
+
`bash codium --profile=cursorlessDevelopment`
37
+
</TabItem>
38
+
</Tabs>
31
39
32
40
and then close the window that opens (eg say `"window close"`). This step is necessary to create the [VSCode settings profile](https://code.visualstudio.com/updates/v1_72#_settings-profiles) that acts as a sandbox containing a specific set of VSCode extensions that will be run alongside Cursorless when you launch Cursorless in debug or test mode. Once https://github.com/microsoft/vscode/issues/172046 is resolved, we will be able to remove this step, as the profile can then automatically be created.
33
41
34
42
5. Run the following in the terminal:
35
43
36
-
```bash
37
-
pnpm init-vscode-sandbox
38
-
```
39
-
40
-
The `pnpm init-vscode-sandbox` command creates a local [VSCode settings profile](https://code.visualstudio.com/updates/v1_72#_settings-profiles) that acts as a sandbox containing a specific set of VSCode extensions that will be run alongside Cursorless when you launch Cursorless in debug or test mode. This approach is [suggested](https://code.visualstudio.com/updates/v1_72#_extension-debugging-in-a-clean-environment) by the VSCode documentation. If you need to update any of the extension dependencies in the sandbox, you can add `--force` to the command. If you'd like to use additional extensions when debugging locally, you can use the following command:
while manual installation instructions can be found directly
58
+
below—replace `some.extension` with the acquired `.vsix` file's path
59
+
instead of an extension id.
60
+
</TabItem>
61
+
</Tabs>
62
+
63
+
Said command adds extensions to the aforementioned settings profile that acts as a sandbox containing a specific set of VSCode extensions that will be run alongside Cursorless when you launch Cursorless in debug or test mode. This approach is [suggested](https://code.visualstudio.com/updates/v1_72#_extension-debugging-in-a-clean-environment) by the VSCode documentation. If you need to update any of the extension dependencies in the sandbox, you can add `--force` to the command. If you'd like to use additional extensions when debugging locally, you can use the following command:
Copy file name to clipboardExpand all lines: packages/cursorless-org-docs/src/docs/contributing/cheatsheet.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The implementation of the local version of the cheatsheet is split between the T
8
8
9
9
When you add a new scope type, action, modifier, etc, you'll need to ensure that it shows up both locally and on the website. It will usually automatically show up in the local cheatsheet. You can verify this by saying `"cursorless cheatsheet"` with your development version of `cursorless-talon` active in your Talon user directory, and inspecting the cheatsheet that appears. If it does not, you'll need to make fixes to [the Talon side of the cheatsheet](../../../../../cursorless-talon/src/cheatsheet).
10
10
11
-
In either case, to get your changes to appear on the website, you need to update the defaults in [`defaults.json`](../../../../../packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json). First make sure you have the `cursorless-talon-dev` user file set in your Talon home directory, as indicated in the [initial contributor setup instructions](CONTRIBUTING.md#initial-setup). Then you can say `"cursorless update cheatsheet"` to update the default spoken forms. Note that this will use your custom spoken forms, so you may need to do some manual cleanup.
11
+
In either case, to get your changes to appear on the website, you need to update the defaults in [`defaults.json`](../../../../../packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json). First make sure you have the `cursorless-talon-dev` user file set in your Talon home directory, as indicated in the [initial contributor setup instructions](CONTRIBUTING.mdx#initial-setup). Then you can say `"cursorless update cheatsheet"` to update the default spoken forms. Note that this will use your custom spoken forms, so you may need to do some manual cleanup.
Copy file name to clipboardExpand all lines: packages/cursorless-org-docs/src/docs/contributing/cursorless-in-neovim.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Note that Cursorless is maintained as a monorepo, hosted at [`cursorless`](https
8
8
9
9
### 1. Follow the initial contributor setup guide
10
10
11
-
Follow the steps in [CONTRIBUTING.md](./CONTRIBUTING.md#initial-setup).
11
+
Follow the steps in [CONTRIBUTING.mdx](./CONTRIBUTING.mdx#initial-setup).
12
12
13
13
### 2. Get production Cursorless neovim working
14
14
@@ -45,7 +45,7 @@ In order to test out your local version of the extension or to run unit tests lo
45
45
46
46
NOTE: This will spawn a standalone nvim instance that is independent of VSCode. Consequently after you're done debugging, you need to close nvim.
47
47
48
-
If you don't have the `cursorless-talon-dev` files in your Talon user directory as described in step 6 of [CONTRIBUTING.md](./CONTRIBUTING.md#initial-setup), then you instead need to run the `workbench.action.debug.selectandstart` command in VSCode and then select either "Neovim: Run" or "Neovim: Test".
48
+
If you don't have the `cursorless-talon-dev` files in your Talon user directory as described in step 6 of [CONTRIBUTING.mdx](./CONTRIBUTING.mdx#initial-setup), then you instead need to run the `workbench.action.debug.selectandstart` command in VSCode and then select either "Neovim: Run" or "Neovim: Test".
0 commit comments