Skip to content

Commit 963c0e4

Browse files
committed
Update CONTRIBUTING docs and change format to mdx
Required to smoothly show commands for both VSCode and VSCodium when they differ
1 parent 9edd9ad commit 963c0e4

File tree

3 files changed

+50
-20
lines changed

3 files changed

+50
-20
lines changed

packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.md renamed to packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.mdx

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Contributing
25

36
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
@@ -10,44 +13,71 @@ extension](#running--testing-extension-locally). You may also find the [VSCode A
1013
- [Git](https://git-scm.com/)
1114
- [Node.js](https://nodejs.org/en/)
1215
- [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.
16+
- [VSCode](https://code.visualstudio.com/) or [VSCodium](https://vscodium.com/); minimum version for local development is 1.72.0 (1.72.0.22279 for VSCodium) in order to support settings profiles for sandboxed development. Please file an issue if that is a problem.
1417

1518
### Steps
1619

1720
1. Clone [`cursorless`](https://github.com/cursorless-dev/cursorless) locally. Note that it doesn't matter where you clone it, as long as you _**do not**_ clone it into your Talon user directory.
18-
2. Open the newly created `cursorless` directory in VSCode. If you're on Windows, don't use WSL (see [#919](https://github.com/cursorless-dev/cursorless/issues/919) for discussion / workaround).
21+
2. Open the newly created `cursorless` directory in VSCode/VSCodium. If you're on Windows, don't use WSL (see [#919](https://github.com/cursorless-dev/cursorless/issues/919) for discussion / workaround).
1922
3. Run the following in the terminal:
2023

2124
```bash
2225
pnpm install
2326
pnpm compile
2427
```
2528

26-
4. Run
29+
4. Run the following in the terminal:
2730

28-
```bash
29-
code --profile=cursorlessDevelopment
30-
```
31+
<Tabs groupId="vsx">
32+
<TabItem value="vscode" label="VSCode" default>
33+
```bash
34+
code --profile=cursorlessDevelopment
35+
```
36+
</TabItem>
37+
<TabItem value="vscodium" label="VSCodium">
38+
```bash
39+
codium --profile=cursorlessDevelopment
40+
```
41+
</TabItem>
42+
</Tabs>
3143

32-
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.
44+
and then close the window that opens (eg say `"window close"`). This step is necessary to create the [settings profile](https://code.visualstudio.com/updates/v1_72#_settings-profiles) that acts as a sandbox containing a specific set of VSX 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.
3345

3446
5. Run the following in the terminal:
3547

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:
41-
42-
```bash
43-
code --profile=cursorlessDevelopment --install-extension some.extension
44-
```
48+
<Tabs groupId="vsx">
49+
<TabItem value="vscode" label="VSCode">
50+
```bash
51+
pnpm init-vscode-sandbox
52+
```
53+
</TabItem>
54+
<TabItem value="vscodium" label="VSCodium">
55+
```bash
56+
pnpm init-codium-sandbox
57+
```
58+
</TabItem>
59+
</Tabs>
60+
61+
Said command adds extensions to the aforementioned settings profile that acts as a sandbox containing a specific set of VSX 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:
62+
63+
<Tabs groupId="vsx">
64+
<TabItem value="vscode" label="VSCode">
65+
```bash
66+
code --profile=cursorlessDevelopment --install-extension some.extension
67+
```
68+
</TabItem>
69+
<TabItem value="vscodium" label="VSCodium">
70+
```bash
71+
codium --profile=cursorlessDevelopment --install-extension some.extension
72+
```
73+
</TabItem>
74+
</Tabs>
4575

4676
where `some.extension` is the id of the extension you'd like to install into the sandbox.
4777

4878
Note that you do not need to install the Cursorless extension into the `cursorlessDevelopment` profile. A local development version of Cursorless will be automatically installed there every time you debug the extension, as described below.
4979

50-
Also note that if you are adding support for a new language that isn't in the default list of [language identifiers](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers) supported by VSCode, you may need to add an extension dependency. See [Adding a new language](./adding-a-new-language.md#2-ensure-file-type-is-supported-by-vscode) for more details.
80+
Also note that if you are adding support for a new language that isn't in the default list of [language identifiers](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers) supported by VSCode/VSCodium, you may need to add an extension dependency. See [Adding a new language](./adding-a-new-language.md#2-ensure-file-type-is-supported-by-vscode) for more details.
5181

5282
6. Copy / symlink [`cursorless-talon-dev`](../../cursorless-talon-dev) into your Talon user directory for some useful voice commands for developing Cursorless.
5383

packages/cursorless-org-docs/src/docs/contributing/cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The implementation of the local version of the cheatsheet is split between the T
88

99
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).
1010

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.
1212

1313
## Running the cheatsheet in development mode
1414

packages/cursorless-org-docs/src/docs/contributing/cursorless-in-neovim.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Note that Cursorless is maintained as a monorepo, hosted at [`cursorless`](https
88

99
### 1. Follow the initial contributor setup guide
1010

11-
Follow the steps in [CONTRIBUTING.md](./CONTRIBUTING.md#initial-setup).
11+
Follow the steps in [CONTRIBUTING.mdx](./CONTRIBUTING.mdx#initial-setup).
1212

1313
### 2. Get production Cursorless neovim working
1414

@@ -45,7 +45,7 @@ In order to test out your local version of the extension or to run unit tests lo
4545

4646
NOTE: This will spawn a standalone nvim instance that is independent of VSCode. Consequently after you're done debugging, you need to close nvim.
4747

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".
4949

5050
### Running lua tests
5151

0 commit comments

Comments
 (0)