Merlin is able to perform documentation lookup and jump to the definition. In Emacs, I'm assuming, that you're using Emacs, the documentation lookup is not bound by default to any key, so I bound it to C-c C-d
. Add the following to your emacs configuration file:
(define-key merlin-mode-map (kbd "C-c C-d") 'merlin-document)
(define-key merlin-mode-map (kbd "C-c d") 'merlin-destruct)
The lookup function will jump directly to the mli
file. This is my favorite way of reading the documentation. Unfortunately, due to a bug, Janestreet stopped to ship the mli
file, so the feature is somewhat broken with the core. As a workaround, you can install source code with
opam source core_kernel
And then create a .merlin
file, and point it to the sources:
S <path-to-sources>
Usually, it would be something like this
S ../core_kernel.113.33.00/src
Note, you should point merlin directly to the source subfolder.
It is also worth noting, that Merlin has intellisence like completion, that helps a lot, and you can hit F1
when you choose an entry from a completion list, and a window with documentation will pop up.
And finally, the link to the documentation, that you're referencing is very outdated. Here is the link to the latest documentation.