LSP working for Julia oh my god that was terrible
This commit is contained in:
parent
fac2a9acb5
commit
e28e10c054
|
@ -518,6 +518,7 @@ PLEASE GIVE UP
|
||||||
repl: "julia",
|
repl: "julia",
|
||||||
main: "main.jl",
|
main: "main.jl",
|
||||||
run: "julia -L 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!")
|
template: `println("Hello, world!")
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -84,6 +84,9 @@ class RijuMessageWriter extends AbstractMessageWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
write(msg: Message): void {
|
write(msg: Message): void {
|
||||||
|
if ((msg as any).method === "initialize") {
|
||||||
|
(msg as any).params.processId = null;
|
||||||
|
}
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
console.log("SEND LSP:", msg);
|
console.log("SEND LSP:", msg);
|
||||||
}
|
}
|
||||||
|
@ -184,8 +187,11 @@ async function main() {
|
||||||
documentSelector: [{ pattern: "**" }],
|
documentSelector: [{ pattern: "**" }],
|
||||||
middleware: {
|
middleware: {
|
||||||
workspace: {
|
workspace: {
|
||||||
configuration: () => {
|
configuration: (params, token, configuration) => {
|
||||||
return [config.lspConfig || {}];
|
(window as any).config = configuration;
|
||||||
|
return Array(
|
||||||
|
(configuration(params, token) as {}[]).length
|
||||||
|
).fill(config.lspConfig || null);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,6 +5,10 @@ set -o pipefail
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Needed for project infrastructure
|
# Needed for project infrastructure
|
||||||
|
cd /tmp
|
||||||
|
mkdir /opt/julia
|
||||||
|
export JULIA_DEPOT_PATH=/opt/julia
|
||||||
|
|
||||||
npm config set unsafe-perm true
|
npm config set unsafe-perm true
|
||||||
PERL_MM_USE_DEFAULT=1 cpan App::cpanminus
|
PERL_MM_USE_DEFAULT=1 cpan App::cpanminus
|
||||||
rm -rf /tmp/cpan_install_*.txt
|
rm -rf /tmp/cpan_install_*.txt
|
||||||
|
@ -37,6 +41,9 @@ npm install -g @kachkaev/run-elm
|
||||||
# FORTRAN
|
# FORTRAN
|
||||||
pip3 install fortran-language-server
|
pip3 install fortran-language-server
|
||||||
|
|
||||||
|
# Julia
|
||||||
|
julia -e 'using Pkg; Pkg.add("LanguageServer")'
|
||||||
|
|
||||||
# Perl
|
# Perl
|
||||||
cpanm -n Devel::REPL
|
cpanm -n Devel::REPL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue