tools/flycheck: inhibit popups when company is in use
Should only appear if in normal mode or, if evil is disabled, when company isn't active.
This commit is contained in:
parent
8b5b3deaba
commit
ad677433ef
1 changed files with 7 additions and 3 deletions
|
@ -39,10 +39,11 @@ errors.")
|
||||||
;; the cursor's position or cause disruptive input delays.
|
;; the cursor's position or cause disruptive input delays.
|
||||||
(add-hook! '(evil-insert-state-entry-hook evil-replace-state-entry-hook)
|
(add-hook! '(evil-insert-state-entry-hook evil-replace-state-entry-hook)
|
||||||
#'flycheck-popup-tip-delete-popup)
|
#'flycheck-popup-tip-delete-popup)
|
||||||
(defadvice! +flycheck--disable-popup-tip-in-insert-mode-a (&rest _)
|
(defadvice! +flycheck--disable-popup-tip-maybe-a (&rest _)
|
||||||
:before-while #'flycheck-popup-tip-show-popup
|
:before-while #'flycheck-popup-tip-show-popup
|
||||||
(or (not evil-local-mode)
|
(if evil-local-mode
|
||||||
(not (memq evil-state '(insert replace)))))))
|
(eq evil-state 'normal)
|
||||||
|
(not (bound-and-true-p company-backend))))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! flycheck-posframe
|
(use-package! flycheck-posframe
|
||||||
|
@ -54,6 +55,9 @@ errors.")
|
||||||
(setq flycheck-posframe-warning-prefix "⚠ "
|
(setq flycheck-posframe-warning-prefix "⚠ "
|
||||||
flycheck-posframe-info-prefix "··· "
|
flycheck-posframe-info-prefix "··· "
|
||||||
flycheck-posframe-error-prefix "✕ ")
|
flycheck-posframe-error-prefix "✕ ")
|
||||||
|
(after! company
|
||||||
|
;; Don't display popups if company is open
|
||||||
|
(add-hook 'flycheck-posframe-inhibit-functions #'company--active-p))
|
||||||
(after! evil
|
(after! evil
|
||||||
;; Don't display popups while in insert or replace mode, as it can affect
|
;; Don't display popups while in insert or replace mode, as it can affect
|
||||||
;; the cursor's position or cause disruptive input delays.
|
;; the cursor's position or cause disruptive input delays.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue