Skip to content

Commit

Permalink
ocaml: fix flycheck
Browse files Browse the repository at this point in the history
but keep it disabled (need to test interaction with auto-complete and company)
  • Loading branch information
edwintorok authored and syl20bnr committed Jun 1, 2015
1 parent 264a3c2 commit ab1a1ea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions contrib/!lang/ocaml/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
'(
;; auto-complete
company
flycheck
flycheck-ocaml
;; flycheck
;; flycheck-ocaml
merlin
ocp-indent
tuareg
Expand All @@ -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
Expand Down

0 comments on commit ab1a1ea

Please sign in to comment.