From 5f54da949d2bb72ec20f168709b7543c069d42e6 Mon Sep 17 00:00:00 2001 From: Lasse Peters Date: Fri, 1 Sep 2023 21:20:23 +0200 Subject: [PATCH] feat: allow user to set julia bin via `JULIA_LSP_JULIA_BIN` environment variable (#5) --- bin/julia-lsp | 3 ++- bin/julia-lsp.cmd | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/julia-lsp b/bin/julia-lsp index 54d736a..dc72f13 100755 --- a/bin/julia-lsp +++ b/bin/julia-lsp @@ -37,4 +37,5 @@ export DETACHED="--detached=no" export JULIA_LOAD_PATH=":" export JULIA_DEPOT_PATH="${PKG_ROOT}/store/lsdepot/v1" -exec julia --startup-file=no --history-file=no --depwarn=no "${PKG_ROOT}/extension/scripts/languageserver/main.jl" "$JULIA_ENVIRONMENT_PATH" "$DEBUG" "$IGNORE_TELEMETRY_CRASH" "$OLD_DEPOT_PATH" "$STORAGE_PATH" "$USE_SYMSERVER_DOWNLOADS" "$SYMSERVER_UPSTREAM" "$DETACHED" +: ${JULIA_LSP_JULIA_BIN:=julia} +exec "$JULIA_LSP_JULIA_BIN" --startup-file=no --history-file=no --depwarn=no "${PKG_ROOT}/extension/scripts/languageserver/main.jl" "$JULIA_ENVIRONMENT_PATH" "$DEBUG" "$IGNORE_TELEMETRY_CRASH" "$OLD_DEPOT_PATH" "$STORAGE_PATH" "$USE_SYMSERVER_DOWNLOADS" "$SYMSERVER_UPSTREAM" "$DETACHED" diff --git a/bin/julia-lsp.cmd b/bin/julia-lsp.cmd index ee3d68a..e5dd9a6 100755 --- a/bin/julia-lsp.cmd +++ b/bin/julia-lsp.cmd @@ -22,9 +22,12 @@ IF "%SYMBOL_SERVER%"=="" ( ) ELSE ( set "SYMSERVER_UPSTREAM=%SYMBOL_SERVER%" ) -set "DETACHED=--detached=no" +IF "%JULIA_LSP_JULIA_BIN%"=="" ( + set "JULIA_LSP_JULIA_BIN=julia" +) +set "DETACHED=--detached=no" set "JULIA_LOAD_PATH=;" set "JULIA_DEPOT_PATH=%PKG_ROOT%\store\lsdepot\v1" -julia --startup-file=no --history-file=no --depwarn=no "%PKG_ROOT%\extension\scripts\languageserver\main.jl" "%JULIA_ENVIRONMENT_PATH%" "%DEBUG%" "%IGNORE_TELEMETRY_CRASH%" "%OLD_DEPOT_PATH%" "%STORAGE_PATH%" "%USE_SYMSERVER_DOWNLOADS%" "%SYMSERVER_UPSTREAM%" "%DETACHED%" +"%JULIA_LSP_JULIA_BIN%" --startup-file=no --history-file=no --depwarn=no "%PKG_ROOT%\extension\scripts\languageserver\main.jl" "%JULIA_ENVIRONMENT_PATH%" "%DEBUG%" "%IGNORE_TELEMETRY_CRASH%" "%OLD_DEPOT_PATH%" "%STORAGE_PATH%" "%USE_SYMSERVER_DOWNLOADS%" "%SYMSERVER_UPSTREAM%" "%DETACHED%"