Skip to content

Commit 9edd9ad

Browse files
committed
hacky workaround to OpenVSX Marketplace stuff
1 parent db3ab51 commit 9edd9ad

File tree

6 files changed

+40
-1
lines changed

6 files changed

+40
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ cursorless.nvim/node/test-harness
5454

5555
# nix
5656
.direnv/
57+
58+
# unignore .vsix files in data/vsix
59+
# required for vscodium dev env setup until https://github.com/jrieken/vscode-tree-sitter-query/issues/28 is closed
60+
!data/vsix/*.vsix
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 - present Microsoft Corporation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

data/vsix/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Used in the rare case an extension required for the development environment is not present on the OpenVSX Marketplace (or the VSCode Marketplace, though that is far less likely).
2+
3+
As such, `.vsix` files in this directory are included in the git repository. **Make sure the extension license permits redistribution before adding it to this directory, and include a copy of the license!**
4+
Binary file not shown.

packages/common/src/extensionDependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const extensionDependencies = [
55
// Register necessary language-IDs for tests
66
"scala-lang.scala", // scala
77
"mrob95.vscode-talonscript", // talon
8-
//"jrieken.vscode-tree-sitter-query", // scm TODO: UNDO THIS WHEN PUBLISHED TO OPENVSX
8+
"jrieken.vscode-tree-sitter-query", // scm
99
"mathiasfrohlich.kotlin", // kotlin
1010

1111
// Necessary for the `drink cell` and `pour cell` tests

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,28 @@
33
*/
44
import { extensionDependencies } from "@cursorless/common";
55
import * as cp from "child_process";
6+
import * as path from "node:path"
67

78
const extraExtensions = ["pokey.command-server"];
89

910
async function main() {
1011
try {
12+
1113
const args = [
1214
"--profile=cursorlessDevelopment",
1315
...[...extensionDependencies, ...extraExtensions].flatMap(
1416
(dependency) => ["--install-extension", dependency],
1517
),
1618
];
1719

20+
// remove attempt to get vscode-tree-sitter-query from OpenVSX marketplace
21+
var index: number = args.findIndex((value) => value.includes("vscode-tree-sitter-query"))
22+
args.splice(index, 1)
23+
24+
// add vscode-tree-sitter-query via .vsix file
25+
const location : string = path.join("..", "..", "data", "vsix", "jrieken.vscode-tree-sitter-query-0.0.6.vsix")
26+
args.push("--profile=cursorlessDevelopment --install-extension ".concat(location))
27+
1828
if (process.argv.includes("--force")) {
1929
args.push("--force");
2030
}

0 commit comments

Comments
 (0)