ocaml: flycheck support
if syntax-checking configuration layer is turned on in .spacemacs
This commit is contained in:
parent
a4d6c78ef3
commit
9b598b1d72
|
@ -17,8 +17,8 @@
|
|||
utop
|
||||
ocp-indent
|
||||
company
|
||||
;; flycheck
|
||||
;; flycheck-ocaml
|
||||
flycheck
|
||||
flycheck-ocaml
|
||||
;; package ocamls go here
|
||||
))
|
||||
|
||||
|
@ -69,14 +69,22 @@
|
|||
(when (configuration-layer/layer-usedp 'auto-completion)
|
||||
;; Hook company to merlin-mode
|
||||
(defun ocaml/post-init-company ()
|
||||
(spacemacs|add-company-hook merlin-mode)))
|
||||
(spacemacs|add-company-hook merlin-mode)
|
||||
))
|
||||
|
||||
;; (defun ocaml/init-flycheck-ocaml ()
|
||||
;; (progn
|
||||
;; (setq merlin-error-after-save nil)
|
||||
;; (flycheck-ocaml-setup)
|
||||
;; )
|
||||
;; )
|
||||
(when (configuration-layer/layer-usedp 'syntax-checking)
|
||||
(defun ocaml/init-flycheck-ocaml ()
|
||||
(use-package flycheck-ocaml
|
||||
: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>
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue