Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support macos #55

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion editors/code/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
**/tsconfig.base.json
contributing.md
.travis.yml
src/**
src/**
node_modules
95 changes: 72 additions & 23 deletions editors/code/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@
},
"dependencies": {
"@hpcc-js/wasm": "^2.13.0",
"@types/which": "^3.0.3",
"anser": "^2.1.1",
"d3": "^7.8.5",
"d3-graphviz": "^5.0.2",
"vscode-languageclient": "^8.1.0"
"vscode-languageclient": "^8.1.0",
"which": "^4.0.0"
},
"devDependencies": {
"@tsconfig/strictest": "^2.0.1",
Expand Down
17 changes: 16 additions & 1 deletion editors/code/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,28 @@ import {
ServerOptions,
Trace,
} from "vscode-languageclient/node";
import which = require("which");

let client: LanguageClient;

export async function activate(context: ExtensionContext) {
// If the extension is launched in debug mode then the debug server options are used
// Otherwise the run options are used
const ccls_path = 'ccls';
const platform = process.platform;
let ccls_path = "cclss";

const exist_ccls = await which(ccls_path, { nothrow: true });

if (exist_ccls === null) {
if (platform === "linux") {
ccls_path = path.join(__dirname, "../bin/ccls_linux");
} else if (platform === "darwin") {
ccls_path = path.join(__dirname, "../bin/ccls_mac");
} else {
window.showErrorMessage(`We don't support ${platform}`);
}
}

const run: Executable = {
command: process.env.__CIRCOM_LSP_SERVER_DEBUG ?? ccls_path,
};
Expand Down
Loading