Refactor flycheck config

This commit is contained in:
Henrik Lissner 2015-11-20 03:59:09 -05:00
parent f3e6fa58fc
commit 66de890cfb
2 changed files with 3 additions and 8 deletions

View file

@ -24,8 +24,7 @@
;; Check buffer when normal mode is entered
(add-hook! evil-normal-state-entry 'narf*flycheck-buffer)
;; And on ESC in normal mode.
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer)
(advice-add 'flycheck-mode-line-status-text :filter-return 'narf*fly-shorter-status))
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer))
(use-package flyspell :commands flyspell-mode)

View file

@ -1,13 +1,9 @@
;;; defuns-flycheck.el
;; for ../core-flycheck.el
;;;###autoload
(defun narf*fly-shorter-status (result)
(format "[%s]" (replace-regexp-in-string " FlyC:?" "" result)))
;;;###autoload
(defun narf*flycheck-buffer ()
(if (and (featurep 'flycheck) flycheck-mode)
(when (and (featurep 'flycheck) flycheck-mode)
(flycheck-buffer)))
;;;###autoload