I’m using VSCode to develop in OCaml and I have to say it is rather pleasant. However, recently it does not seem to be able to evolve much. Does anyone know what is the best extension to work with ?
There are 3 :
- vscode-ocaml, which is deprecated
OCaml and Reason IDE, which is nice but has some bugs and things that could be improved.
reason-vscode, that is entierly developed in Reason, but does not seem compatible with the OCaml workflow
I’m currently using the second one, but there are some small bugs that I’d like corrected and some features that I’d like added. However, it seems that the project is not maintained anymore. I made a pull request 3 months ago that is still open and that has no answer, and the last commit was 2 month ago, and only added a small line to the readme advising to try Jaredly’s extension (the third one) “if you are on our default [reason] workflow”.
Does anyone have any advice ?
If anyone else is interested in updates, here it is
reason-vscode still has some big issues, it still does not work on any of my projects.
OCaml and Reason IDE currently has a branch that is implementing the
merlin-language-server, which is an Reason-written bridge between the LSP and Merlin. It is actively maintained and I hope that when it’s merged, the extension will be once again properly maintained.
I believe this is the right path to go, merlin is a very mature and powerful tool for OCaml and I believe rewriting an entire language server from start is quite dangerous. A bridge between the protocol and merlin seems quite promising.
I think merlin now includes its own LSP implementation:
Not sure if there has been a release that includes this yet, but certainly the next merlin release should include it.
From great news to great news ! I know there was an open issue about investigating the LSP directly from Merlin, but I didn’t know it had been done by a PR !
So to answer that, I might have given wrong information. It’s andreypopp (the person who made this PR) who told me that there was work on the
OCaml and Reason IDE to integrate the merlin language server. I looked on google and find merlin-language-server and thought it would be that one, but I don’t know exactly which one it is.
I apologise for not explicitly citing my sources.
Nice! I hadn’t seen that merlin had finished their lsp frontend. It feels so much faster than ocaml-language-server
It is not really finished, we still have work in progress on it to reach feature parity with the existing merlin protocol. And to improve the stability. But it is slowly getting better. I use it every day for over a month and it’s pretty good so far.