diff --git a/docs/contributing/CONTRIBUTING.md b/docs/contributing/CONTRIBUTING.md index 8ad61eac25..64b6f4e878 100644 --- a/docs/contributing/CONTRIBUTING.md +++ b/docs/contributing/CONTRIBUTING.md @@ -43,7 +43,9 @@ extension](#running--testing-extension-locally). You may also find the [VSCode A code --profile=cursorlessDevelopment --install-extension some.extension ``` - where `some.extension` is the id of the extension you'd like to install into the sandbox + where `some.extension` is the id of the extension you'd like to install into the sandbox. + + 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. 6. Copy / symlink `cursorless-talon-dev` into your Talon user directory for some useful voice commands for developing Cursorless. diff --git a/docs/contributing/adding-a-new-language.md b/docs/contributing/adding-a-new-language.md index 860b817f29..b692992cb3 100644 --- a/docs/contributing/adding-a-new-language.md +++ b/docs/contributing/adding-a-new-language.md @@ -9,7 +9,11 @@ of a document. See the [docs](https://github.com/pokey/vscode-parse-tree/#adding-a-new-language) there for how to add support for a new parser -## 2. Define parse tree patterns in Cursorless +## 2. Ensure file type is supported by VSCode + +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. + +## 3. Define parse tree patterns in Cursorless First a few notes / tips: