Khady / merlin-eldoc

Type and doc on hover for OCaml and Reason in emacs
GNU General Public License v3.0
43 stars 3 forks source link

Support navigating between occurrences #25

Closed Wilfred closed 6 years ago

Wilfred commented 6 years ago

It would be wonderful to have a command that allowed moving point between the different occurrences of a symbol.

Khady commented 6 years ago

I think this is more related to merlin than merlin-eldoc. M-x merlin-occurrences opens a buffer with all the other occurrences and a way to jump to any of them. It seems to be a pretty standard behavior. I don't know if it is possible to build keybindings on top of that. Or if it would be better to have such a keybinding in merlin-eldoc.

On 28 Jun 2018, at 00:38, Wilfred Hughes notifications@github.com wrote:

It would be wonderful to have a command that allowed moving point between the different occurrences of a symbol.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Khady commented 6 years ago

@wilfred I'm willing to add this feature. Not sure of how to do this properly. And you seem to be experienced with emacs development. So it would be wonderful if you could guide me a little.

Do you think I should just create a function and let users bind it? Or it would be better to create a map? Or extend the one provided by merlin?

The last option is probably not very nice as in theory it is possible to use merlin-eldoc without merlin-mode.

If I have an option to loop once the end of the list is reached, should it display a message saying "end of file reached, searching from top" or something similar?

Khady commented 6 years ago

@Wilfred I added to functions to jump between occurrences. Please let me know if it works for you.

Wilfred commented 6 years ago

@Khady that works wonderfully! Thank you :)