From b3fb71f50179ef51cf0224e72e4dd314b4fb8d73 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Wed, 8 Jul 2020 19:09:22 -0600 Subject: [PATCH] LSP working for Erlang --- backend/src/langs.ts | 1 + scripts/docker-install-phase3b.bash | 1 + scripts/docker-install-phase5.bash | 6 ++++++ scripts/docker-install-phase7.bash | 8 ++++++++ 4 files changed, 16 insertions(+) diff --git a/backend/src/langs.ts b/backend/src/langs.ts index fac2624..0775412 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -368,6 +368,7 @@ output = "Hello, world!" main: "main.erl", compile: "erl -compile main", run: "erl -s main main", + lsp: "erlang_ls", template: `-module(main). -export([main/0]). diff --git a/scripts/docker-install-phase3b.bash b/scripts/docker-install-phase3b.bash index 60e9aad..0a6e4fa 100755 --- a/scripts/docker-install-phase3b.bash +++ b/scripts/docker-install-phase3b.bash @@ -17,6 +17,7 @@ emacs-nox # Erlang erlang +rebar # F# fsharp diff --git a/scripts/docker-install-phase5.bash b/scripts/docker-install-phase5.bash index 1716cda..ab0763b 100755 --- a/scripts/docker-install-phase5.bash +++ b/scripts/docker-install-phase5.bash @@ -35,6 +35,7 @@ rm dmd_*.deb wget -nv https://github.com/elixir-lsp/elixir-ls/releases/download/v0.5.0/elixir-ls.zip unzip -d /opt/elixir-ls elixir-ls.zip ln -s /opt/elixir-ls/language_server.sh /usr/bin/elixir-ls +rm elixir-ls.zip # Elm wget -nv https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz @@ -42,6 +43,11 @@ gunzip binary-for-linux-64-bit.gz chmod +x binary-for-linux-64-bit mv binary-for-linux-64-bit /usr/bin/elm +# Erlang +wget -nv https://s3.amazonaws.com/rebar3/rebar3 +chmod +x rebar3 +mv rebar3 /usr/bin/rebar3 + # Go export GO111MODULE=on export GOPATH=/tmp/go diff --git a/scripts/docker-install-phase7.bash b/scripts/docker-install-phase7.bash index 29e0075..ab215ad 100755 --- a/scripts/docker-install-phase7.bash +++ b/scripts/docker-install-phase7.bash @@ -5,6 +5,14 @@ set -o pipefail set -x pushd /tmp >/dev/null +# Erlang +git clone https://github.com/erlang-ls/erlang_ls.git +pushd erlang_ls >/dev/null +make +mv _build/default/bin/erlang_ls /usr/bin/erlang_ls +popd >/dev/null +rm -rf erlang_ls + # Kalyn git clone https://github.com/raxod502/kalyn.git pushd kalyn >/dev/null