ocaml: flycheck support

if syntax-checking configuration layer is turned on in .spacemacs
This commit is contained in:
Török Edwin 2015-04-18 19:26:24 +03:00 committed by syl20bnr
parent a4d6c78ef3
commit 9b598b1d72

View file

@ -17,8 +17,8 @@
utop utop
ocp-indent ocp-indent
company company
;; flycheck flycheck
;; flycheck-ocaml flycheck-ocaml
;; package ocamls go here ;; package ocamls go here
)) ))
@ -69,14 +69,22 @@
(when (configuration-layer/layer-usedp 'auto-completion) (when (configuration-layer/layer-usedp 'auto-completion)
;; Hook company to merlin-mode ;; Hook company to merlin-mode
(defun ocaml/post-init-company () (defun ocaml/post-init-company ()
(spacemacs|add-company-hook merlin-mode))) (spacemacs|add-company-hook merlin-mode)
))
;; (defun ocaml/init-flycheck-ocaml () (when (configuration-layer/layer-usedp 'syntax-checking)
;; (progn (defun ocaml/init-flycheck-ocaml ()
;; (setq merlin-error-after-save nil) (use-package flycheck-ocaml
;; (flycheck-ocaml-setup) :if (configuration-layer/package-usedp 'flycheck)
;; ) :defer t
;; ) :init
(add-hook 'merlin-mode-hook 'flycheck-mode)
(with-eval-after-load 'merlin
;; Disable Merlin's own error checking
(setq merlin-error-after-save nil)
;; Enable Flycheck checker
(flycheck-ocaml-setup))
)))
;; For each package, define a function ocaml/init-<package-ocaml> ;; For each package, define a function ocaml/init-<package-ocaml>
;; ;;