# Emacs package for automatic type display

**URL:** <https://discuss.ocaml.org/t/emacs-package-for-automatic-type-display/1897>\
**Category:** Ecosystem\
**Tags:** merlin, emacs\
**Created:** [April 23, 2018, 3:07pm UTC](https://discuss.ocaml.org/t/emacs-package-for-automatic-type-display/1897 "2018-04-23T15:07:16Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Khady](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/khady/32/469_2.png) [@Khady](https://discuss.ocaml.org/u/Khady)\
**Post date:** [May 27, 2018, 4:51pm UTC](https://discuss.ocaml.org/t/emacs-package-for-automatic-type-display/1897/14 "2018-05-27T16:51:42Z")

</div>

The package has a new name `merlin-eldoc`. Available here: [https://github.com/Khady/merlin-eldoc](https://github.com/Khady/merlin-eldoc)

Also it has been released on [melpa](https://melpa.org/#/merlin-eldoc) so it is now easy to install: `M-x package-install RET merlin-eldoc` 🎉 .

Since the first version:

- from 50 to 500 lines of elisp
- display type and/or doc of value at point
- highlight occurrences of value at point
- display a hint with type and/or labels expected while calling a function
- integrate with eldoc, so it is not a minor mode and it respects eldoc configuration options
- support reason syntax
- many configuration options to choose the shape and the verbosity of the output

The exact list of changes is at [https://github.com/Khady/merlin-eldoc/blob/master/CHANGES.org](https://github.com/Khady/merlin-eldoc/blob/master/CHANGES.org)

Latest demo (without all the fixes, but with all the features):

![](https://us1.discourse-cdn.com/flex020/uploads/ocaml/original/2X/e/e4af697f148852c2a9eec49f575d28797e86939f.gif)

I have been asked how it compares to what is provided by lsp-mode and lsp-ocaml. I find that merlin-eldoc is way more polished. For example it keeps the documentation as ocamldoc rather than markdown, it highlights the types, it can reformat type and doc to fit one line, … It also offers more configuration options. But they are not exclusive, it is possible to use lsp-ocaml + merlin-eldoc (+ merlin too if you miss commands like `merlin-destruct`).

---

_[View the full topic](https://discuss.ocaml.org/t/emacs-package-for-automatic-type-display/1897)._
