doomemacs/modules/tools/flycheck/autoload.el
2019-02-28 13:50:48 -05:00

14 lines
541 B
EmacsLisp

;;; tools/flycheck/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +flycheck|init-popups ()
"Activate `flycheck-posframe-mode' if available and in GUI Emacs.
Activate `flycheck-popup-tip-mode' otherwise.
Do nothing if `lsp-ui-mode' is active and `lsp-ui-sideline-enable' is non-nil."
(unless (and (bound-and-true-p lsp-ui-mode)
lsp-ui-sideline-enable)
(if (and (fboundp 'flycheck-posframe-mode)
(display-graphic-p))
(flycheck-posframe-mode +1)
(flycheck-popup-tip-mode +1))))