From ab1a1eae6061c404748db45dab8af18d5e4dc0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B6r=C3=B6k=20Edwin?= Date: Fri, 22 May 2015 21:38:15 +0300 Subject: [PATCH] ocaml: fix flycheck but keep it disabled (need to test interaction with auto-complete and company) --- contrib/!lang/ocaml/packages.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/!lang/ocaml/packages.el b/contrib/!lang/ocaml/packages.el index a061698b0..80cf0037b 100644 --- a/contrib/!lang/ocaml/packages.el +++ b/contrib/!lang/ocaml/packages.el @@ -14,8 +14,8 @@ '( ;; auto-complete company - flycheck - flycheck-ocaml + ;; flycheck + ;; flycheck-ocaml merlin ocp-indent tuareg @@ -29,16 +29,19 @@ (spacemacs|add-company-hook merlin-mode)) (when (configuration-layer/layer-usedp 'syntax-checking) + (defun ocaml/post-init-flycheck () + (add-hook 'merlin-mode-hook 'flycheck-mode)) (defun ocaml/init-flycheck-ocaml () (use-package flycheck-ocaml :if (configuration-layer/package-usedp 'flycheck) :defer t :init (progn - (add-to-hook 'merlin-mode-hook '(flycheck-mode - flycheck-ocaml-setup)) - (eval-after-load 'merlin - (setq merlin-use-auto-complete-mode nil)))))) + (with-eval-after-load 'merlin + (progn + (setq merlin-error-after-save nil) + (flycheck-ocaml-setup)) + ))))) (defun ocaml/init-merlin () (use-package merlin