Skip to content

Commit

Permalink
Fix vscode build
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesrosiers committed Mar 12, 2024
1 parent 64c283f commit 20ee596
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"vscode:prepublish": "npm run build-client -- --minify && npm run build-server -- --minify",
"build": "npm run build-client -- --sourcemap && npm run build-server -- --sourcemap",
"build-client": "esbuild ./src/extension.js --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"build-server": "esbuild ../language-server/src/server.js --bundle --outfile=out/server.js --external:vscode --format=cjs --platform=node",
"build-server": "esbuild ../language-server/src/server.js --bundle --main-fields=module,main --outfile=out/server.js --external:vscode --format=cjs --platform=node",
"package": "vsce package --out=dist",
"publish": "vsce publish"
},
Expand Down
32 changes: 13 additions & 19 deletions vscode/src/extension.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
"use strict";
const path = require("node:path");
const { LanguageClient } = require("vscode-languageclient/node.js");
const { LanguageClient, TransportKind } = require("vscode-languageclient/node.js");


let client;

const activate = (context) => {
// const serverModule = context.asAbsolutePath(path.join("out", "server.js"));
// const serverOptions = {
// run: {
// module: serverModule,
// transport: TransportKind.ipc
// },
// debug: {
// module: serverModule,
// transport: TransportKind.ipc,
// options: {
// execArgc: ["--nolazy", "--inspect=6009"]
// }
// }
// };

// Temporary Hack. Get the above code working.
const serverModule = context.asAbsolutePath(path.join("out", "server.js"));
const serverOptions = {
command: "node",
args: [context.asAbsolutePath(path.join("..", "language-server", "src", "server.js")), "--stdio"]
run: {
module: serverModule,
transport: TransportKind.ipc
},
debug: {
module: serverModule,
transport: TransportKind.ipc,
options: {
execArgc: ["--nolazy", "--inspect=6009"]
}
}
};

const clientOptions = {
Expand Down

0 comments on commit 20ee596

Please sign in to comment.