doomemacs/init/init-fly.el
2015-05-07 03:19:24 -04:00

45 lines
1.5 KiB
EmacsLisp

(use-package flycheck
:init
(setq-default flycheck-indication-mode 'right-fringe
;; Removed checks on idle/change for snappiness
flycheck-check-syntax-automatically '(save mode-enabled idle-change)
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
:config
(progn ; flycheck settings
(dolist (hook '(ruby-mode-hook
python-mode-hook
php-mode-hook
lua-mode-hook
shell-mode-hook
scss-mode-hook
c++-mode-hook
c-mode-hook
))
(add-hook hook 'flycheck-mode))
(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)
(defun my--evil-flycheck-buffer ()
(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)
;; And on ESC in normal mode.
(defadvice evil-force-normal-state (after evil-esc-flycheck-buffer activate)
(my--evil-flycheck-buffer))
(push '("^\\*Flycheck.*\\*$" :regexp t :position bottom :height 0.25 :noselect t)
popwin:special-display-config)))
(use-package flyspell :commands flyspell-mode)
(provide 'init-fly)
;;; init-fly.el ends here