doomemacs/core/core-flycheck.el

32 lines
1.2 KiB
EmacsLisp
Raw Normal View History

2015-06-15 15:05:52 +08:00
;;; core-flycheck.el --- check yourself before you shrek yourself
;; Related to: lib/defuns-flycheck.el
(use-package flycheck
:diminish flycheck-mode
:commands (flycheck-mode flycheck-list-errors flycheck-buffer)
2015-06-15 15:05:52 +08:00
:init
(setq flycheck-indication-mode 'right-fringe
2015-06-15 15:05:52 +08:00
;; Removed checks on idle/change for snappiness
flycheck-check-syntax-automatically '(save mode-enabled)
2015-06-15 15:05:52 +08:00
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
:config
(evil-initial-state 'flycheck-error-list-mode 'emacs)
2015-11-22 05:22:40 +08:00
(bind! (:map flycheck-error-list-mode-map
:n [escape] 'kill-this-buffer
:n "q" 'kill-this-buffer
:n "C-n" 'flycheck-error-list-next-error
:n "C-p" 'flycheck-error-list-previous-error
:n "j" 'flycheck-error-list-next-error
:n "k" 'flycheck-error-list-previous-error
:n "RET" 'flycheck-error-list-goto-error))
2015-06-15 15:05:52 +08:00
;; Check buffer when normal mode is entered
(add-hook! evil-normal-state-entry 'narf*flycheck-buffer)
;; And on ESC in normal mode.
2015-11-20 16:59:09 +08:00
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer))
2015-06-15 15:05:52 +08:00
(use-package flyspell :commands flyspell-mode)
(provide 'core-flycheck)
;;; core-flycheck.el ends here