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",
|
||||
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!")
|
||||
`,
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue