doomemacs/modules/feature/syntax-checker/config.el

35 lines
1.2 KiB
EmacsLisp
Raw Normal View History

;;; feature/syntax-checker/config.el -*- lexical-binding: t; -*-
2017-02-13 05:51:36 -05:00
(def-package! flycheck
:commands (flycheck-list-errors flycheck-buffer)
:after-call (after-find-file doom-before-switch-buffer)
2017-02-13 05:51:36 -05:00
:config
;; Emacs feels snappier without checks on newline
(setq flycheck-check-syntax-automatically '(save idle-change mode-enabled))
2017-02-13 05:51:36 -05:00
(after! evil
(defun +syntax-checkers|flycheck-buffer ()
"Flycheck buffer on ESC in normal mode."
2017-05-25 12:22:05 +02:00
(when flycheck-mode
(ignore-errors (flycheck-buffer))
nil))
(add-hook 'doom-escape-hook #'+syntax-checkers|flycheck-buffer t)
(add-hook 'evil-insert-state-exit-hook #'+syntax-checkers|flycheck-buffer))
(global-flycheck-mode +1))
2017-02-13 05:51:36 -05:00
(def-package! flycheck-popup-tip
:commands (flycheck-popup-tip-show-popup flycheck-popup-tip-delete-popup)
:init (add-hook 'flycheck-mode-hook #'+syntax-checker-popup-mode)
:config (setq flycheck-popup-tip-error-prefix ""))
(def-package! flycheck-posframe
:when (and EMACS26+ (featurep! +childframe))
:commands flycheck-posframe-show-posframe
:config
(setq flycheck-posframe-warning-prefix ""
flycheck-posframe-info-prefix "··· "
flycheck-posframe-error-prefix ""))