From 67c1e6e89cea426e77e7a844376a38a4e7b2ec46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Thu, 23 Mar 2023 09:04:27 +0000 Subject: [PATCH] Eglot: inform ElDoc about overly long 'hover' docs * lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Include :echo info in return value. --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index d88647ccbdf..919f44a2d9a 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3169,7 +3169,8 @@ for which LSP on-type-formatting should be requested." (eglot--when-buffer-window buf (let ((info (unless (seq-empty-p contents) (eglot--hover-info contents range)))) - (funcall cb info :buffer t)))) + (funcall cb info + :echo (and info (string-match "\n" info)))))) :deferred :textDocument/hover)) (eglot--highlight-piggyback cb) t)) -- 2.39.2