Skip to content

Commit

Permalink
feat: allow user to set julia bin via JULIA_LSP_JULIA_BIN environme…
Browse files Browse the repository at this point in the history
…nt variable (#5)
  • Loading branch information
lassepe authored Sep 1, 2023
1 parent 177edb2 commit 5f54da9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin/julia-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 5 additions & 2 deletions bin/julia-lsp.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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%"

0 comments on commit 5f54da9

Please sign in to comment.