Add posframe for flymake errors in gui mode

This commit is contained in:
Alexander Rosenberg 2023-10-27 20:56:50 -07:00
parent 7f64ecc06f
commit 2118704d98
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

14
init.el
View File

@ -392,6 +392,9 @@ visual states."
;; popup.el ;; popup.el
(use-package popup) (use-package popup)
;; popwin
(use-package posframe)
;; flymake ;; flymake
(use-package flymake (use-package flymake
:bind (:map flymake-mode-map :bind (:map flymake-mode-map
@ -405,7 +408,16 @@ visual states."
(diag (and flymake-mode (diag (and flymake-mode
(get-char-property pos 'flymake-diagnostic))) (get-char-property pos 'flymake-diagnostic)))
(message (flymake--diag-text diag))) (message (flymake--diag-text diag)))
(popup-tip message)))) (if (display-graphic-p)
(progn
(posframe-show " *flymake-error-posframe*"
:string message
:position (point)
:max-width 80)
(clear-this-command-keys)
(push (read-event) unread-command-events)
(posframe-hide " *flymake-error-posframe*"))
(popup-tip message)))))
;; eldoc ;; eldoc
(use-package eldoc (use-package eldoc