merlin
merlin copied to clipboard
Can't go-to-definition in generated file
Hi, I am very new to OCaml but I've been working on the Sail compiler which is written in OCaml using VSCode and ocaml-lsp. Generally the LSP works very well, however there is an issue with the generated file _build/default/src/lib/ast.ml. Ocaml-lsp seems to know at least something about the types in it, because you can hover them and it shows their types. For example in src/lib/ast_util.ml on this line:
| Nexp_if (i1, t1, e1), Nexp_if (i2, t2, e2) ->
Nexp_if is defined in _build/default/src/lib/ast.ml. If I hover i1 it says the type is n_constraint which is correct! However for some reason I cannot ctrl-click / go-to-definition on Nexp_if.
If I run
dune ocaml merlin dump-config src/lib
Then it doesn't have (S .../_build/default/src/lib) anywhere, though it does have (B .../_build/default/src/lib/.libsail.objs/byte).
Any idea why this isn't working or how to make it work?