Skip to content

Commit 5c069e3

Browse files
fidgetingbitsfidgetingbitspokey
authored
Clarify extension dependency instructions for adding a new language (#1903)
Following a discussion on Slack between Andreas and River about the Elixir PR tests failing, it seems like the docs needed to be updated to clarify how to add an extension dependency when adding support for a language type that vscode isn't natively aware of. ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet --------- Co-authored-by: fidgetingbits <[email protected]> Co-authored-by: Pokey Rule <[email protected]>
1 parent 128933a commit 5c069e3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/contributing/CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ extension](#running--testing-extension-locally). You may also find the [VSCode A
4343
code --profile=cursorlessDevelopment --install-extension some.extension
4444
```
4545

46-
where `some.extension` is the id of the extension you'd like to install into the sandbox
46+
where `some.extension` is the id of the extension you'd like to install into the sandbox.
47+
48+
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.
4749

4850
6. Copy / symlink `cursorless-talon-dev` into your Talon user directory for some useful voice commands for developing Cursorless.
4951

docs/contributing/adding-a-new-language.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ of a document. See the
99
[docs](https://github.com/pokey/vscode-parse-tree/#adding-a-new-language) there
1010
for how to add support for a new parser
1111

12-
## 2. Define parse tree patterns in Cursorless
12+
## 2. Ensure file type is supported by VSCode
13+
14+
If you are adding support for a new language that isn't natively detected by VSCode, you will need to add the appropriate extension to the list of dependencies. The list of languages officially supported by VSCode is listed [in the VSCode docs](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). If your language is in that list, you can skip this step and proceed to step 3. If your language is not in that list, you need to find a VSCode extension that adds support for your language, and add the id of the given extension to [`packages/common/src/extensionDependencies.ts`](../../packages/common/src/extensionDependencies.ts) and then re-run `pnpm init-vscode-sandbox` to ensure it is installed. If you do not do this you will encounter errors when attempting to execute cursorless commands in the next step. See [#1895](https://github.com/cursorless-dev/cursorless/issues/1895) for more info.
15+
16+
## 3. Define parse tree patterns in Cursorless
1317

1418
First a few notes / tips:
1519

0 commit comments

Comments
 (0)