I have been test driving new dune. Here is the workflow I came up with.
$ dune init proj hello
# Edit dune-project depends
(depends ocaml dune ocaml-lsp-server ocamlformat)
$ dune pkg lock
# Run these commands to build ocamllsp, ocamlformat
$ dune exec ocamllsp
$ dune exec ocamlformat
# export PATH for helix editor
$ export PATH="$PWD/_build/_private/default/.pkg/ocaml-lsp-server/target/bin:$PWD/_build/_private/default/.pkg/ocamlformat/target/bin:$PATH"
Start helix editor at bin/main.ml
, and LSP just works.
Is there a way to automate LSP installation and changing PATH
like above?