Skip to content

Commit

Permalink
Eglot: inform ElDoc about overly long 'hover' docs
Browse files Browse the repository at this point in the history
* lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Include :echo
  info in return value.
  • Loading branch information
joaotavora committed Mar 23, 2023
1 parent e19994f commit 67c1e6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/progmodes/eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 67c1e6e

Please sign in to comment.