lang/elixir: conditionally install flycheck-credo
And register flycheck-credo after elixir-mode loads.
This commit is contained in:
parent
f52d76bccf
commit
92cfcf3627
2 changed files with 7 additions and 7 deletions
|
@ -26,7 +26,11 @@
|
||||||
;; the entire closure to get rid of it.
|
;; the entire closure to get rid of it.
|
||||||
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
||||||
(remove-hook 'alchemist-mode-hook fn)
|
(remove-hook 'alchemist-mode-hook fn)
|
||||||
(remove-hook 'alchemist-iex-mode-hook fn))))
|
(remove-hook 'alchemist-iex-mode-hook fn)))
|
||||||
|
|
||||||
|
(def-package! flycheck-credo
|
||||||
|
:when (featurep! :feature syntax-checker)
|
||||||
|
:config (flycheck-credo-setup)))
|
||||||
|
|
||||||
|
|
||||||
(def-package! alchemist
|
(def-package! alchemist
|
||||||
|
@ -37,8 +41,3 @@
|
||||||
:documentation #'alchemist-help-search-at-point)
|
:documentation #'alchemist-help-search-at-point)
|
||||||
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
|
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
|
||||||
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run))
|
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run))
|
||||||
|
|
||||||
(def-package! flycheck-credo
|
|
||||||
:when (featurep! :feature syntax-checker)
|
|
||||||
:after flycheck
|
|
||||||
:config (flycheck-credo-setup))
|
|
||||||
|
|
|
@ -4,4 +4,5 @@
|
||||||
;; +elixir.el
|
;; +elixir.el
|
||||||
(package! elixir-mode)
|
(package! elixir-mode)
|
||||||
(package! alchemist)
|
(package! alchemist)
|
||||||
(package! flycheck-credo)
|
(when (featurep! :feature syntax-checker)
|
||||||
|
(package! flycheck-credo))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue