ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
363 stars 79 forks source link

How does one jump to definition? #301

Closed mimoo closed 1 year ago

mimoo commented 2 years ago

I followed the installation instructions but it is not clear from the README how one should use this plugin. How do I jump to definition, for example?

mimoo commented 2 years ago

I've found some stackoverflow answer saying that C-c C-l should work, but I'm getting this error:

No annotation file. Compile with option "-annot" or set ‘caml-annot-dir’.

bbatsov commented 1 year ago

@mimoo It's best to install Merlin alongside Tuareg (or lsp-mode/elgot which use Merlin internally for OCaml) and leverage it for the definition lookup. See https://ocaml.github.io/merlin/ for details.

mimoo commented 1 year ago

yes I was missing merlin!