doomemacs/init/init-fly.el

37 lines
1.3 KiB
EmacsLisp
Raw Normal View History

2014-09-06 05:08:40 +08:00
(provide 'init-fly)
2014-08-30 10:37:25 +08:00
(use-package flycheck
2014-12-06 06:28:03 +08:00
:defer t
:init (add-hook 'prog-mode-hook 'flycheck-mode)
:config
(progn ; flycheck settings
2014-10-10 06:37:37 +08:00
(setq-default flycheck-indication-mode 'right-fringe
;; Removed checks on idle/change for snappiness
2014-12-06 06:28:03 +08:00
flycheck-check-syntax-automatically '(save mode-enabled)
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
(my--cleanup-buffers-add "^\\*Flycheck.*\\*$")
(bind 'normal flycheck-error-list-mode-map
[escape] 'kill-this-buffer
"q" 'kill-this-buffer)
(evil-initial-state 'flycheck-error-list-mode 'emacs)
(evil-ex-define-cmd "er[rors]" (λ (flycheck-buffer) (flycheck-list-errors)))
2014-12-06 06:28:03 +08:00
(defun my--evil-flycheck-buffer ()
2014-12-06 06:28:03 +08:00
(if (and (featurep 'flycheck) flycheck-mode)
(flycheck-buffer)))
;; Check buffer when normal mode is entered
(add-hook 'evil-normal-state-entry-hook 'my--evil-flycheck-buffer)
2014-12-06 06:28:03 +08:00
;; And on ESC in normal mode.
(defadvice evil-force-normal-state (after evil-esc-flycheck-buffer activate)
(my--evil-flycheck-buffer))
2014-12-06 06:28:03 +08:00
(push '("^\\*Flycheck.*\\*$" :regexp t :position bottom :height 0.25 :noselect t)
2014-12-06 06:28:03 +08:00
popwin:special-display-config)))
2014-08-08 06:35:22 +08:00
(use-package flyspell :commands flyspell-mode)