2015-06-15 15:05:52 +08:00
|
|
|
;;; core-flycheck.el --- check yourself before you shrek yourself
|
|
|
|
|
|
|
|
(use-package flycheck
|
2015-10-16 02:01:53 +08:00
|
|
|
:commands (flycheck-mode flycheck-list-errors flycheck-buffer)
|
2015-06-15 15:05:52 +08:00
|
|
|
:init
|
2015-11-12 15:07:48 +08:00
|
|
|
(setq flycheck-indication-mode 'right-fringe
|
2015-06-15 15:05:52 +08:00
|
|
|
;; Removed checks on idle/change for snappiness
|
2015-11-12 15:07:48 +08:00
|
|
|
flycheck-check-syntax-automatically '(save mode-enabled)
|
2016-06-05 12:11:46 +08:00
|
|
|
flycheck-highlighting-mode 'symbols
|
2016-02-23 04:23:49 +08:00
|
|
|
flycheck-disabled-checkers '(emacs-lisp emacs-lisp-checkdoc make))
|
2016-04-19 14:08:48 +08:00
|
|
|
|
2015-06-15 15:05:52 +08:00
|
|
|
:config
|
2016-06-03 12:59:04 +08:00
|
|
|
;; Display warning symbol unicode better
|
|
|
|
(doom-fix-unicode "DejaVu Sans Mono" '(?⚠) 18)
|
2016-05-25 09:57:25 +08:00
|
|
|
(def-popup! " ?\\*Flycheck.+\\*" :align below :size 14 :noselect t :regexp t)
|
|
|
|
|
2016-05-11 17:36:49 +08:00
|
|
|
(unless (> emacs-major-version 24)
|
|
|
|
;; Fixes Unknown defun property `interactive-only' error (in emacs <25) by compiling
|
|
|
|
;; flycheck source files
|
|
|
|
(let ((path (locate-library "flycheck")))
|
|
|
|
(unless (f-ext? path "elc")
|
|
|
|
(byte-compile-file path))))
|
2016-03-05 11:38:04 +08:00
|
|
|
|
2016-03-30 11:48:06 +08:00
|
|
|
(map! :map flycheck-error-list-mode-map
|
2016-05-08 10:05:00 +08:00
|
|
|
: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
|
|
|
|
2016-05-08 10:05:00 +08:00
|
|
|
;; Flycheck buffer on ESC in normal mode.
|
2016-05-21 10:37:30 +08:00
|
|
|
(advice-add 'evil-force-normal-state :after 'doom*flycheck-buffer)
|
2015-12-12 05:51:04 +08:00
|
|
|
|
|
|
|
(define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
|
2016-05-24 05:03:20 +08:00
|
|
|
[0 0 0 0 0 4 12 28 60 124 252 124 60 28 12 4 0 0 0 0]))
|
2015-06-15 15:05:52 +08:00
|
|
|
|
2016-04-24 10:08:46 +08:00
|
|
|
(use-package flycheck-package
|
|
|
|
:after flycheck
|
|
|
|
:config (flycheck-package-setup))
|
|
|
|
|
|
|
|
(use-package flycheck-pos-tip
|
2016-05-08 09:56:21 +08:00
|
|
|
:when (= emacs-major-version 24)
|
2016-04-24 10:08:46 +08:00
|
|
|
:after flycheck
|
|
|
|
:config
|
|
|
|
(setq flycheck-pos-tip-timeout 10
|
|
|
|
flycheck-display-errors-delay 0.5)
|
|
|
|
(flycheck-pos-tip-mode +1))
|
|
|
|
|
2015-06-15 15:05:52 +08:00
|
|
|
(use-package flyspell :commands flyspell-mode)
|
|
|
|
|
|
|
|
(provide 'core-flycheck)
|
|
|
|
;;; core-flycheck.el ends here
|