WIP: Scala LSP

This commit is contained in:
Radon Rosborough 2020-08-22 19:47:24 -06:00
parent 5610772c15
commit d9c23e9450
2 changed files with 13 additions and 0 deletions

View File

@ -2062,6 +2062,9 @@ binding_irb.run(IRB.conf)
scope: {
code: `val x = 123 * 234`,
},
lsp: {
start: `mkdir -p .cache; [[ -d .cache/coursier ]] || cp -R /opt/coursier/cache .cache/coursier; JAVA_OPTS="-Duser.home=$PWD" metals`,
},
template: `println("Hello, world!")
`,
timeout: 30,

View File

@ -237,6 +237,16 @@ for file in /opt/rust/bin/*; do
ln -s /opt/rust/wrapper "/usr/local/bin/${file##*/}"
done
# Scala
file="$(curl -sSL https://scalameta.org/metals/docs/editors/emacs.html | grep -Eo 'org.scalameta[^ ]+')"
wget -nv https://git.io/coursier-cli
chmod +x coursier-cli
mv coursier-cli /usr/local/bin/coursier
coursier bootstrap --java-opt -Xss4m --java-opt -Xms100m --java-opt -Dmetals.client=emacs "${file}" -r bintray:scalacenter/releases -r sonatype:snapshots -o /usr/local/bin/metals
metals -version </dev/null
mkdir /opt/coursier
mv "$HOME/.cache/coursier" /opt/coursier/cache
# SETL
wget -nv https://setl.org/setl/bin/Linux-x86-64bit/setlbin.tgz
tar -xf setlbin.tgz -C /usr/local/bin