Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Error squiggles and ocamlformat stopped working for me after the first time I restarted VS Code, compared to regular OCaml. They do work fine through the Dune CLI though.


Did you change the opam switch that vscode extension uses? It needs to be set to the oxcaml switch - you can do this via the "Ocaml: Select a Sandbox for this Workspace" command.


Yes I did, I'm used to working with opam, and when I first changed the switch it worked until I restarted VS Code. But since then I haven't managed to make it work again.


Hmm. Did you install ocaml-lsp-server on the OxCaml switch? I also tend to run dune in polling mode (-w), not sure if that matters…


Fwiw I had the same experience as debugnik with ocaml-lsp-server installed, irrespective of whether I built in polling mode.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: