Disable +flycheck-popup-mode in lsp-ui-mode #1192

As its redundant with lsp-ui's sideline feature.
This commit is contained in:
Henrik Lissner 2019-02-24 13:52:36 -05:00
parent 5e24c93d4c
commit 899c4b8117
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 13 additions and 2 deletions

View file

@ -42,3 +42,11 @@
flycheck-popup-tip-old-display-function nil)
(dolist (hook hooks)
(remove-hook hook '+flycheck-cleanup-popup t))))))
;;;###autoload
(defun +flycheck|disable-popup-mode-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-mode -1)))

View file

@ -32,8 +32,11 @@
(def-package! flycheck-popup-tip
:commands (flycheck-popup-tip-show-popup flycheck-popup-tip-delete-popup)
:init (add-hook 'flycheck-mode-hook #'+flycheck-popup-mode)
:config (setq flycheck-popup-tip-error-prefix ""))
:init
(add-hook 'flycheck-mode-hook #'+flycheck-popup-mode)
(add-hook '+flycheck-popup-mode-hook #'+flycheck|disable-popup-mode-for-lsp)
:config
(setq flycheck-popup-tip-error-prefix ""))
(def-package! flycheck-posframe