From: João Távora Date: Thu, 23 Mar 2023 09:04:27 +0000 (+0000) Subject: Eglot: inform ElDoc about overly long 'hover' docs X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67c1e6e89cea426e77e7a844376a38a4e7b2ec46;p=emacs.git Eglot: inform ElDoc about overly long 'hover' docs * lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Include :echo info in return value. --- 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))