diff --git a/spacemacs/packages.el b/spacemacs/packages.el index ee89396a2..853efcdb7 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -871,9 +871,12 @@ determine the state to enable when escaping from the insert state.") (defun spacemacs/init-flycheck () (use-package flycheck + :commands flycheck-mode :defer t :init (progn + (evil-leader/set-key + "ef" 'flycheck-mode) (dolist (mode '(c coffee js @@ -963,11 +966,14 @@ determine the state to enable when escaping from the insert state.") :fringe-face 'flycheck-fringe-info) ;; key bindings - (evil-leader/set-key - "fc" 'flycheck-clear - "fl" 'flycheck-list-errors - "fn" 'flycheck-next-error - "fp" 'flycheck-previous-error)))) + (add-hook 'flycheck-mode-hook '(lambda () + (evil-leader/set-key + "ec" 'flycheck-clear + "el" 'flycheck-list-errors + "en" 'flycheck-next-error + "ep" 'flycheck-previous-error) + )) + ))) (defun spacemacs/init-flycheck-ledger () (eval-after-load 'flycheck