Skip to content

Commit 3522bba

Browse files
Stop depending on extension dependencies for language ids in tests (#3191)
Multiple contributed languages for the same id are merged. Since we don't contribute anything else than the id we will not be clobbering any language contributions the user has from their other extensions.
1 parent beee7c1 commit 3522bba

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
export const extensionDependencies = [
22
// Cursorless access to Tree sitter
33
"pokey.parse-tree",
4-
5-
// Register necessary language-IDs for tests
6-
"scala-lang.scala", // scala
7-
"mrob95.vscode-talonscript", // talon
8-
"jrieken.vscode-tree-sitter-query", // scm
9-
"mathiasfrohlich.kotlin", // kotlin
10-
11-
// Necessary for the `drink cell` and `pour cell` tests
12-
"ms-toolsai.jupyter",
134
];

packages/cursorless-vscode/package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,24 @@
12271227
"group": "navigation"
12281228
}
12291229
]
1230-
}
1230+
},
1231+
"languages": [
1232+
{
1233+
"id": "talon"
1234+
},
1235+
{
1236+
"id": "talon-list"
1237+
},
1238+
{
1239+
"id": "scala"
1240+
},
1241+
{
1242+
"id": "kotlin"
1243+
},
1244+
{
1245+
"id": "scm"
1246+
}
1247+
]
12311248
},
12321249
"scripts": {
12331250
"build": "pnpm run esbuild:prod && pnpm -F cheatsheet-local build:prod && pnpm -F cursorless-vscode-tutorial-webview build:prod && pnpm run populate-dist",

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ async function main() {
2121
}
2222
});
2323

24-
let extensions = [...extensionDependencies, "pokey.command-server"];
24+
const extensions = [
25+
...extensionDependencies,
26+
"pokey.command-server",
27+
"mrob95.vscode-talonscript",
28+
];
2529

2630
// Do not attempt to install jrieken:vscode-tree-sitter-query if editor is NOT VSCode, assuming lack of access to VSCode Marketplace
27-
if (cliToolName !== vsCodeToolName) {
28-
extensions = extensions.filter(
29-
(e) => e !== "jrieken.vscode-tree-sitter-query",
30-
);
31+
if (cliToolName === vsCodeToolName) {
32+
extensions.push("jrieken.vscode-tree-sitter-query");
33+
} else {
3134
console.log(
3235
"Not installing jrieken:vscode-tree-sitter-query as it is not on the OpenVSX Marketplace.",
3336
);

0 commit comments

Comments
 (0)