merlin
merlin copied to clipboard
Eldoc support in Emacs
I'm curious if there's any reason not to support directly eldoc-mode
in merlin-mode
, as from what I gather from https://github.com/Khady/merlin-eldoc all the necessary information is available there.
What's the recommended way to get type signatures in Emacs these days?
I originally considered opening a PR for the inclusion of merlin-eldoc directly inside merlin. But kept it appart to limit the maintenance burden on the merlin authors (who aren't emacs users themselves). If the situation has changed I'm fine with moving the code here and archiving my repo.
I'm not an OCaml expert, but I know a thing or two about building Emacs packages and I think basic functionality like Eldoc should be bundled with development environments like Merlin. Plus, already the package has extensions about all sorts of things and eldoc
is basic built-in machinery.
When I've started to play with OCaml I was a bit frustrated that I need to figure out how several packages interact with one another (utop
, tuareg
, merlin
, merlin-eldoc
, etc), compared to what I'd do with Clojure and CIDER - I just install CIDER and everything is there. Separately maintained packages tend to introduce inconsistencies and might occasionally go out of sync as well).
If more Emacs maintainers are needed for merlin.el
- I'd be happy to help. I already noticed that Merlin doesn't quite follow the modern Emacs development practices. I just have to learn a bit more OCaml along the way. :-)
So, do we have consensus that we should merge merlin-eldoc
in the main Merlin package?
@bbatsov I think a PR would be the fastest way to make progress on this :) Personally it seems a good idea (especially as it is opt-in: it can be enabled/disabled by toggling eldoc-mode
, right?)
Yeah, that's just a matter of turning on/off eldoc-mode
or removing the setup function. Basically my idea is to just copy the existing merlin-eldoc
package inside the merlin
repo and add it to the main package manifest there.
Btw, who are the Emacs package maintainers these days? I guess we need their blessing as well.
if it goes through, there's probably some work necessary to help emacs distributions transition. For example spacemacs is shipping merlin-eldoc from my repo.
That shouldn't be a big deal - we can keep the old package as some placeholder that just requires merlin
(+ a deprecation warning) and the name of the setup function will remain the same. If you have two of them installed that shouldn't be an issue for most people either.