Skip to content

Commit 7d74c0c

Browse files
ran prettier
1 parent 811221e commit 7d74c0c

File tree

2 files changed

+59
-55
lines changed

2 files changed

+59
-55
lines changed

packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.mdx

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Tabs from '@theme/Tabs';
2-
import TabItem from '@theme/TabItem';
1+
import Tabs from "@theme/Tabs";
2+
import TabItem from "@theme/TabItem";
33

44
# Contributing
55

@@ -13,7 +13,7 @@ Welcome! So glad you've decided to help make Cursorless better. You'll want to s
1313
- [Node.js](https://nodejs.org/en/)
1414
- [Corepack](https://nodejs.org/api/corepack.html) or [pnpm](https://pnpm.io/installation)
1515
- [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.
16+
Both VSCode and VSCodium will be referred to as VSCode except when instructions differ between the editors.
1717

1818
### Steps
1919

@@ -29,50 +29,48 @@ Both VSCode and VSCodium will be referred to as VSCode except when instructions
2929
4. Run the following in the terminal:
3030

3131
<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>
32+
<TabItem value="vscode" label="VSCode" default>
33+
```bash code --profile=cursorlessDevelopment ```
34+
</TabItem>
35+
<TabItem value="vscodium" label="VSCodium">
36+
```bash codium --profile=cursorlessDevelopment ```
37+
</TabItem>
4238
</Tabs>
4339

4440
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.
4541

4642
5. Run the following in the terminal:
4743

4844
<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-vscode-sandbox --codium
57-
```
58-
VSCodium users will also need to manually download and install the `jrieken:vscode-tree-sitter-query` extension, as it is [currently not avalible](https://github.com/jrieken/vscode-tree-sitter-query/issues/28) on the OpenVSX Marketplace.
59-
Instructions on how to manually download the extension can be found [in this Stack Overflow post](https://stackoverflow.com/a/79565372) ([archived](https://web.archive.org/web/20250421130639/https://stackoverflow.com/questions/79359919/how-can-i-manually-download-vsix-files-now-that-the-vs-code-marketplace-no-long/79565372#79565372)), while manual installation instructions can be found directly below—replace `some.extension` with the acquired `.vsix` file's path instead of an extension id.
60-
</TabItem>
45+
<TabItem value="vscode" label="VSCode">
46+
```bash pnpm init-vscode-sandbox ```
47+
</TabItem>
48+
<TabItem value="vscodium" label="VSCodium">
49+
```bash pnpm init-vscode-sandbox --codium ``` VSCodium users will also
50+
need to manually download and install the
51+
`jrieken:vscode-tree-sitter-query` extension, as it is [currently not
52+
avalible](https://github.com/jrieken/vscode-tree-sitter-query/issues/28)
53+
on the OpenVSX Marketplace. Instructions on how to manually download the
54+
extension can be found [in this Stack Overflow
55+
post](https://stackoverflow.com/a/79565372)
56+
([archived](https://web.archive.org/web/20250421130639/https://stackoverflow.com/questions/79359919/how-can-i-manually-download-vsix-files-now-that-the-vs-code-marketplace-no-long/79565372#79565372)),
57+
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>
6161
</Tabs>
6262

6363
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:
6464

6565
<Tabs groupId="vsx">
66-
<TabItem value="vscode" label="VSCode">
67-
```bash
68-
code --profile=cursorlessDevelopment --install-extension some.extension
69-
```
70-
</TabItem>
71-
<TabItem value="vscodium" label="VSCodium">
72-
```bash
73-
codium --profile=cursorlessDevelopment --install-extension some.extension
74-
```
75-
</TabItem>
66+
<TabItem value="vscode" label="VSCode">
67+
```bash code --profile=cursorlessDevelopment --install-extension
68+
some.extension ```
69+
</TabItem>
70+
<TabItem value="vscodium" label="VSCodium">
71+
```bash codium --profile=cursorlessDevelopment --install-extension
72+
some.extension ```
73+
</TabItem>
7674
</Tabs>
7775
7876
where `some.extension` is the id of the extension you'd like to install into the sandbox.
@@ -138,18 +136,18 @@ vsce package -o bundle.vsix
138136

139137
Once you have your package then you can install it into the sandbox using the following command:
140138

141-
<Tabs groupId="vsx">
142-
<TabItem value="vscode" label="VSCode">
143-
```bash
144-
code --profile=cursorlessDevelopment --install-extension bundle.vsix
145-
```
146-
</TabItem>
147-
<TabItem value="vscodium" label="VSCodium">
148-
```bash
149-
codium --profile=cursorlessDevelopment --install-extension bundle.vsix
150-
```
151-
</TabItem>
152-
</Tabs>
139+
{" "}
140+
141+
<Tabs groupId="vsx">
142+
<TabItem value="vscode" label="VSCode">
143+
```bash code --profile=cursorlessDevelopment --install-extension bundle.vsix
144+
```
145+
</TabItem>
146+
<TabItem value="vscodium" label="VSCodium">
147+
```bash codium --profile=cursorlessDevelopment --install-extension
148+
bundle.vsix ```
149+
</TabItem>
150+
</Tabs>
153151
154152
## Installing a local build of the Cursorless extension
155153

packages/cursorless-vscode/src/scripts/initLaunchSandbox.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import * as cp from "child_process";
88

99
const extraExtensions = ["pokey.command-server"];
1010

11-
const vsCodeToolName : string = "code"
12-
const validCliToolParams : Array<string> = ["--code", "--codium"]
11+
const vsCodeToolName: string = "code";
12+
const validCliToolParams: Array<string> = ["--code", "--codium"];
1313

1414
async function main() {
1515
try {
1616
// Read cli tool name from arguments, assume tool name is 'code' if not present
1717
let cliToolName = vsCodeToolName;
1818

19-
process.argv.forEach(argument => {
19+
process.argv.forEach((argument) => {
2020
if (validCliToolParams.includes(argument)) {
2121
cliToolName = argument.replace("--", "");
2222
console.log("Cli tool name manually set to " + cliToolName);
@@ -35,11 +35,17 @@ async function main() {
3535
}
3636

3737
// Do not attempt to install jrieken:vscode-tree-sitter-query if editor is NOT VSCode, assuming lack of access to VSCode Marketplace
38-
if (cliToolName !== vsCodeToolName) {
39-
const index: number = args.findIndex((value) => value.includes("vscode-tree-sitter-query"))
40-
args.splice(index, 1)
41-
console.log("Not installing jrieken:vscode-tree-sitter-query as it is not on the OpenVSX Marketplace.")
42-
console.log("You should install this extension manually. Check the Cursorless contributor documentation for more info.")
38+
if (cliToolName !== vsCodeToolName) {
39+
const index: number = args.findIndex((value) =>
40+
value.includes("vscode-tree-sitter-query"),
41+
);
42+
args.splice(index, 1);
43+
console.log(
44+
"Not installing jrieken:vscode-tree-sitter-query as it is not on the OpenVSX Marketplace.",
45+
);
46+
console.log(
47+
"You should install this extension manually. Check the Cursorless contributor documentation for more info.",
48+
);
4349
}
4450

4551
// Install extension dependencies

0 commit comments

Comments
 (0)