diff --git a/backend/src/langs.ts b/backend/src/langs.ts index bf5ac92..8bbe4e8 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -518,6 +518,7 @@ PLEASE GIVE UP repl: "julia", main: "main.jl", run: "julia -L main.jl", + lsp: `JULIA_DEPOT_PATH=:/opt/julia julia -e 'using LanguageServer; run(LanguageServerInstance(stdin, stdout))'`, template: `println("Hello, world!") `, }, diff --git a/frontend/src/app.ts b/frontend/src/app.ts index c12ab85..6642f8e 100644 --- a/frontend/src/app.ts +++ b/frontend/src/app.ts @@ -84,6 +84,9 @@ class RijuMessageWriter extends AbstractMessageWriter { } write(msg: Message): void { + if ((msg as any).method === "initialize") { + (msg as any).params.processId = null; + } if (DEBUG) { console.log("SEND LSP:", msg); } @@ -184,8 +187,11 @@ async function main() { documentSelector: [{ pattern: "**" }], middleware: { workspace: { - configuration: () => { - return [config.lspConfig || {}]; + configuration: (params, token, configuration) => { + (window as any).config = configuration; + return Array( + (configuration(params, token) as {}[]).length + ).fill(config.lspConfig || null); }, }, }, diff --git a/scripts/docker-install-phase4.bash b/scripts/docker-install-phase4.bash index 024ed34..843e372 100755 --- a/scripts/docker-install-phase4.bash +++ b/scripts/docker-install-phase4.bash @@ -5,6 +5,10 @@ set -o pipefail set -x # Needed for project infrastructure +cd /tmp +mkdir /opt/julia +export JULIA_DEPOT_PATH=/opt/julia + npm config set unsafe-perm true PERL_MM_USE_DEFAULT=1 cpan App::cpanminus rm -rf /tmp/cpan_install_*.txt @@ -37,6 +41,9 @@ npm install -g @kachkaev/run-elm # FORTRAN pip3 install fortran-language-server +# Julia +julia -e 'using Pkg; Pkg.add("LanguageServer")' + # Perl cpanm -n Devel::REPL