Merlin: Goto definition inside installed libraries

Thank you for opening that issue! It is indeed the final scenario I’m after. Just as a concrete example I came across today, if I have the below in a file in my Dune project:

(* example.ml *)
let _ = Async.with_timeout

Then I can jump to Async.with_timeout ok. However it turns out this is defined as:

(* async_unix.ml *)
let with_timeout = Clock.with_timeout

So it would be quite handy to be able to jump directly to Clock.with_timeout, though it’s not currently possible.

While searching I came cross this topic How to get merlin to do a good job on project dependencies? How to get dune to generate better .merlin files? and the suggestion of adding .../.opam-switch/build/** to my .merlin file worked, however it’s a manual fix and gets cleared the next time I run dune build.