Hi,
This was my experience with ocaml-lsp-server.
Issue:
I’m quite happy with it except for this small issue.
I wanted to go-to-definition inside an external library but was unable to do so.
I can go-to-definition to a function/module of an external library but I can not browse inside it.
This has been discussed in depth [here].
Discussion:
As of now I’m quite happy with ocaml-lsp-server due to its efficiency, and because it does not consume too much RAM.
I’m a new learner in OCaml and wanted to read code written by experts to learn more about OCaml.
When I learned Rust I was able to browse through the code of any library, and understand how everything worked.
I read from previous discussions [here] that it is not possible to do so due to some reason, however if we build as an opam-monorepo
we could circumvent the restrictions and browse the code of the external.
However I tried to build the otoml
library to read toml files using a monorepo but failed to do so.
Solution (kind of):
Since nothing worked, as of now I have git clone
d the otoml
repo. Now that I have cloned the repo and built it with dune, I can use ocaml-lsp-server to browse through the code with ease.
Conclusion:
I’m pretty happy with most of the things with ocaml, however wished that we could just browse through the code of external libraries as we do in rust.
Since external libraries are pre-compiled they should not change, so is there any strong reason why the LSP can not browse through them?
It would help us learn/use/debug our code as new learners.
Thanks.