From 5aeea4dcaeeaacb9974e160509f051462b0dc26e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 15 Jun 2018 22:24:53 +0200 Subject: [PATCH] Refactor elm+flycheck integration #686 Ensure flycheck is started soon enough and its initializing code is grouped with flycheck-elm's config. --- modules/lang/elm/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/elm/config.el b/modules/lang/elm/config.el index ea7b57d8d..35a5f303e 100644 --- a/modules/lang/elm/config.el +++ b/modules/lang/elm/config.el @@ -4,7 +4,7 @@ (setq elm-format-on-save t) (after! elm-mode - (add-hook! 'elm-mode-hook #'(flycheck-mode rainbow-delimiters-mode)) + (add-hook 'elm-mode-hook #'rainbow-delimiters-mode) (set-company-backend! 'elm-mode 'company-elm) (set-repl-handler! 'elm-mode #'run-elm-interactive)) @@ -12,5 +12,6 @@ (def-package! flycheck-elm :when (featurep! :feature syntax-checker) :after elm-mode - :hook (flycheck-mode . flycheck-elm-setup)) + :init (add-hook 'elm-mode-hook #'flycheck-mode) + :config (add-to-list 'flycheck-checkers 'elm nil #'eq))