From a4a42d3141c445cf5a15cdbe8c83117d67870f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 17 Oct 2018 00:02:14 +0100 Subject: [PATCH] lang/ocaml: enable merlin-imenu and merlin-iedit (part of merlin) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit merlin-imenu works nicely with `SPC / i`. merlin-iedit is a refactoring tool that locates all occurences of an identifier in scope and you can use multiple cursors to edit. integration with evil-multiedit could be better. There is also a merlin-xref backend, but since we got the individual def/lookup/etc. already bound not sure if it is worth using it. Signed-off-by: Edwin Török --- modules/lang/ocaml/config.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 243ec5858..f44e2f1b2 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -57,6 +57,19 @@ :hook (merlin-mode . merlin-eldoc-setup)) + (def-package! merlin-iedit + :when (featurep! :editor multiple-cursors) + :hook (merlin-mode . merlin-use-merlin-imenu) + :config + (map! :map tuareg-mode-map + :v "R" #'merlin-iedit-occurrences)) + + + (def-package! merlin-imenu + :when (featurep! :emacs imenu) + :hook (merlin-mode . merlin-use-merlin-imenu)) + + (def-package! utop :when (featurep! :feature eval) :defer t ; loaded by hook below