diff --git a/eglot.el b/eglot.el index 1a702543..f07209a7 100644 --- a/eglot.el +++ b/eglot.el @@ -1548,7 +1548,11 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp." (when-let (info (and contents (eglot--hover-info contents range))) - (eldoc-message info))))) + (let* ((end (min (1- (window-width (minibuffer-window))) + (or (string-match-p "\n" info) + (length info)))) + (msg (substring info nil end))) + (eldoc-message msg)))))) :deferred :textDocument/hover)) (when (eglot--server-capable :documentHighlightProvider) (jsonrpc-async-request