Hi, I’ve been having some trouble with Ubuntu 20.04 + VSCodium (VSCode) + OCaml Platform extension for VSCode + non-default opam switch.
Eventually I figured out that pressing Ctrl+Shift+P (yes with Shift) and typing ocaml brings up really good commands… I can select the switch to use, I can launch terminal with that switch configured… Pretty cool if not very obvious from the docs.
I still have some questions left
-
is it possible to have
ocamlformat,ocaml-lsp-serverandduneinstalled in one switch and use another to write my hello-world apps?ocamlformatandcoaml-lsp-serverhave pulled in a ton of depdendencies and it would have felt cleaner to use an “empty” switch for development… -
auto-generated
.vscode/tasks.jsonlooks a bit strange:{ "version": "2.0.0", "tasks": [ { "type": "dune", "problemMatcher": [ "$ocamlc" ], "group": { "kind": "build", "isDefault": true }, "label": "dune: build /dune-project" } ] }why this?.. the command that ends up being run is
... dune buildso how is it related to the above? -
Is it expected that I have to close/re-open my workspace (“folder”) to pick up changes to
.vscode/.settings.json?.. -
does it make sense to try to set something like this in
.vscode/settings.json? This doesn’t work…"ocaml.terminal.shell.linux": "bash -ci 'eval $(opam env --switch dev --set-switch); bash'" -
what is the best way to run my app from inside VSCodium? Doing
dune exec ./proj1.exeeach time manually from the correct terminal isn’t that much fun -
is there a debugger that’d work in VSCode/VSCodium? or am I asking too much?



