Formatter and LSP for ReasonML

This commit is contained in:
Radon Rosborough 2020-07-19 18:40:24 -06:00
parent 2a03208fda
commit 19cf4edab4
3 changed files with 17 additions and 0 deletions

View File

@ -1404,6 +1404,9 @@ main = do
main: "main.re",
compile: "bsc main.re > main.js",
run: "NODE_PATH=/usr/lib/node_modules node main.js",
format: "ocamlformat main.re",
lspSetup: `cp -a /opt/reasonml/project-template/* ./`,
lsp: "reason-language-server",
template: `print_string("Hello, world!\\n")
`,
},

View File

@ -198,6 +198,12 @@ chmod +x /opt/mspyls/Microsoft.Python.LanguageServer
ln -s /opt/mspyls/Microsoft.Python.LanguageServer /usr/bin/Microsoft.Python.LanguageServer
rm Python-Language-Server-linux-x64.*.nupkg
# ReasonML
wget -nv https://github.com/jaredly/reason-language-server/releases/download/1.7.10/rls-linux.zip
unzip rls-linux.zip
mv rls-linux/reason-language-server /usr/local/bin/
rm rls-linux.zip
# Scala
wget -nv https://git.io/coursier-cli
chmod +x coursier-cli

View File

@ -26,6 +26,14 @@ popd >/dev/null
mkdir /opt/purescript
mv project-template /opt/purescript/
# ReasonML
mkdir -p /opt/reasonml/project-template
pushd /opt/reasonml/project-template >/dev/null
bsb -init .
cat bsconfig.json | jq '.name = "riju-project"' | sponge bsconfig.json
yarn install
popd >/dev/null
# Befunge
tee /usr/bin/befunge-repl >/dev/null <<"EOF"
#!/usr/bin/env -S NODE_PATH=/usr/lib/node_modules node