parent
812c834970
commit
b871d400e5
2 changed files with 13 additions and 30 deletions
|
@ -1,24 +1,13 @@
|
|||
;;; tools/flycheck/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +flycheck*popup-tip-delete-popup (orig-fn)
|
||||
"TODO"
|
||||
(when (display-graphic-p)
|
||||
(funcall orig-fn)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +flycheck*popup-tip-show-popup (orig-fn errors)
|
||||
"TODO"
|
||||
(if (and EMACS26+
|
||||
(featurep 'flycheck-posframe)
|
||||
(display-graphic-p))
|
||||
(flycheck-posframe-show-posframe errors)
|
||||
(funcall orig-fn errors)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +flycheck|disable-popup-tip-for-lsp ()
|
||||
"Disable `+flycheck-popup-mode' if `lsp-ui-mode' and `lsp-ui-sideline-enable'
|
||||
are non-nil."
|
||||
(when (and (bound-and-true-p lsp-ui-mode)
|
||||
lsp-ui-sideline-enable)
|
||||
(flycheck-popup-tip-mode -1)))
|
||||
(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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue