Formatter and LSP for OCaml
This commit is contained in:
parent
621a05fe4d
commit
2a03208fda
|
@ -1158,6 +1158,9 @@ int main() {
|
||||||
main: "main.ml",
|
main: "main.ml",
|
||||||
repl: "ocaml",
|
repl: "ocaml",
|
||||||
run: "ocaml -init main.ml",
|
run: "ocaml -init main.ml",
|
||||||
|
format: "ocamlformat main.ml",
|
||||||
|
lsp: "ocamllsp",
|
||||||
|
lspLang: "ocaml",
|
||||||
template: `print_string "Hello, world!\\n";;
|
template: `print_string "Hello, world!\\n";;
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,8 +33,9 @@ yarn
|
||||||
gcc
|
gcc
|
||||||
gnustep-devel
|
gnustep-devel
|
||||||
|
|
||||||
# Ocaml
|
# OCaml
|
||||||
ocaml
|
ocaml
|
||||||
|
opam
|
||||||
|
|
||||||
# Octave
|
# Octave
|
||||||
octave
|
octave
|
||||||
|
|
|
@ -8,6 +8,11 @@ set -x
|
||||||
mkdir /opt/julia
|
mkdir /opt/julia
|
||||||
export JULIA_DEPOT_PATH=/opt/julia
|
export JULIA_DEPOT_PATH=/opt/julia
|
||||||
|
|
||||||
|
# Package manager - OCaml
|
||||||
|
export OPAMROOT=/opt/opam
|
||||||
|
export OPAMROOTISOK=1
|
||||||
|
opam init -n --disable-sandboxing
|
||||||
|
|
||||||
# Package manager - Node.js
|
# Package manager - Node.js
|
||||||
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
|
||||||
|
@ -67,6 +72,12 @@ npm install -g less
|
||||||
# LiveScript
|
# LiveScript
|
||||||
npm install -g livescript
|
npm install -g livescript
|
||||||
|
|
||||||
|
# OCaml
|
||||||
|
opam install -y ocamlformat
|
||||||
|
opam pin add -y ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git
|
||||||
|
ln -s /opt/opam/default/bin/ocamlformat /usr/local/bin/ocamlformat
|
||||||
|
ln -s /opt/opam/default/bin/ocamllsp /usr/local/bin/ocamllsp
|
||||||
|
|
||||||
# Perl
|
# Perl
|
||||||
cpanm -n Devel::REPL
|
cpanm -n Devel::REPL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue