Refactor flycheck config
This commit is contained in:
parent
f3e6fa58fc
commit
66de890cfb
2 changed files with 3 additions and 8 deletions
|
@ -24,8 +24,7 @@
|
||||||
;; Check buffer when normal mode is entered
|
;; Check buffer when normal mode is entered
|
||||||
(add-hook! evil-normal-state-entry 'narf*flycheck-buffer)
|
(add-hook! evil-normal-state-entry 'narf*flycheck-buffer)
|
||||||
;; And on ESC in normal mode.
|
;; And on ESC in normal mode.
|
||||||
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer)
|
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer))
|
||||||
(advice-add 'flycheck-mode-line-status-text :filter-return 'narf*fly-shorter-status))
|
|
||||||
|
|
||||||
(use-package flyspell :commands flyspell-mode)
|
(use-package flyspell :commands flyspell-mode)
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
;;; defuns-flycheck.el
|
;;; defuns-flycheck.el
|
||||||
;; for ../core-flycheck.el
|
;; for ../core-flycheck.el
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun narf*fly-shorter-status (result)
|
|
||||||
(format "[%s]" (replace-regexp-in-string " FlyC:?" "" result)))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf*flycheck-buffer ()
|
(defun narf*flycheck-buffer ()
|
||||||
(if (and (featurep 'flycheck) flycheck-mode)
|
(when (and (featurep 'flycheck) flycheck-mode)
|
||||||
(flycheck-buffer)))
|
(flycheck-buffer)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/flycheck-next-error ()
|
(defun narf/flycheck-next-error ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue