elixir: don't use flycheck-mode-hook for checkers

This commit is contained in:
syl20bnr 2016-06-01 11:28:10 -04:00
parent 8f45a94095
commit a019d0a15c
2 changed files with 5 additions and 8 deletions

View file

@ -21,11 +21,8 @@
(defun spacemacs//elixir-enable-compilation-checking ()
"Enable compile checking if `elixir-enable-compilation-checking' is non nil."
(message "djeoifhwfwfjegweifh")
(hack-dir-local-variables)
(let ((enabled (cdr (assq 'elixir-enable-compilation-checking
file-local-variables-alist))))
(message "---> %s" (assq 'elixir-enable-compilation-checking
file-local-variables-alist))
(when (or enabled elixir-enable-compilation-checking)
(elixir-flycheck-mix-compile-setup))))

View file

@ -129,7 +129,7 @@
(defun elixir/init-flycheck-elixir-credo ()
(use-package flycheck-elixir-credo
:defer t
:init (add-hook 'flycheck-mode-hook 'flycheck-elixir-credo-setup)))
:init (add-hook 'elixir-mode-hook 'flycheck-elixir-credo-setup t)))
(defun elixir/init-elixir-flycheck-mix-compile ()
(use-package elixir-flycheck-mix-compile
@ -140,7 +140,7 @@
(cons 'elixir-enable-compilation-checking nil))
(add-to-list 'safe-local-variable-values
(cons 'elixir-enable-compilation-checking t))
(add-hook 'flycheck-mode-hook
(add-hook 'elixir-mode-hook
'spacemacs//elixir-enable-compilation-checking t))
:config
;; enable mix_compile_helper executable
@ -152,7 +152,7 @@
(defun elixir/init-flycheck-elixir-testresult ()
(use-package flycheck-elixir-testresult
:defer t
:init (add-hook 'flycheck-mode-hook 'flycheck-elixir-testresult-setup)
:init (add-hook 'elixir-mode-hook 'flycheck-elixir-testresult-setup t)
;; enable mix_test_helper executable
:config (add-to-list 'exec-path (spacemacs//get-package-directory
'flycheck-elixir-testresult))))
@ -163,8 +163,8 @@
(defun elixir/post-init-flycheck ()
(spacemacs/add-flycheck-hook 'elixir-mode)
(add-hook 'flycheck-mode-hook
'spacemacs//elixir-flycheck-check-on-save-only))
(add-hook 'elixir-mode-hook
'spacemacs//elixir-flycheck-check-on-save-only t))
(defun elixir/pre-init-popwin ()
(spacemacs|use-package-add-hook popwin