From 313265f69c6dac544024139e6ab6e5eb2a0d4bb1 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Mon, 28 Jul 2014 12:52:18 -0700 Subject: [PATCH 1/2] Activate company mode support for merlin Also, provide a commented out sample for activating autocomplete support --- modules/prelude-ocaml.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index 913530e..c952132 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -50,6 +50,13 @@ (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer) (add-hook 'tuareg-mode-hook 'merlin-mode) +;; Setup merlin completions company is used by default in prelude +(add-to-list 'company-backends 'merlin-company-backend) + +;; But merlin also offers support for autocomplete, uncomment this next line +;; to activate it. +;; (setq merlin-use-auto-complete-mode t) + (setq utop-command "opam config exec \"utop -emacs\"" merlin-error-after-save nil) From ed91fb3d7e58beff37f56184fcb3f8b95c6cff93 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Mon, 28 Jul 2014 12:54:09 -0700 Subject: [PATCH 2/2] Remove hook to activate an apparently obsolete tuareg function Trivially fixes #614 by simply removing the offending hook. --- modules/prelude-ocaml.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index c952132..a9254fa 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -38,8 +38,6 @@ (require 'utop) (require 'merlin) -(add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu) - (setq auto-mode-alist (append '(("\\.ml[ily]?\\'" . tuareg-mode) ("\\.topml\\'" . tuareg-mode))