From 2118704d989d6b3cb2fc027a97fb7a9d59e22a8f Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 27 Oct 2023 20:56:50 -0700 Subject: [PATCH] Add posframe for flymake errors in gui mode --- init.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 119d194..5b25a25 100644 --- a/init.el +++ b/init.el @@ -392,6 +392,9 @@ visual states." ;; popup.el (use-package popup) +;; popwin +(use-package posframe) + ;; flymake (use-package flymake :bind (:map flymake-mode-map @@ -405,7 +408,16 @@ visual states." (diag (and flymake-mode (get-char-property pos 'flymake-diagnostic))) (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 (use-package eldoc