Function: eglot-hover-eldoc-function
eglot-hover-eldoc-function is a byte-compiled function defined in
eglot.el.gz.
Signature
(eglot-hover-eldoc-function CB &rest IGNORED)
Documentation
A member of eldoc-documentation-functions, for hover.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot-hover-eldoc-function (cb &rest _ignored)
"A member of `eldoc-documentation-functions', for hover."
(when (eglot-server-capable :hoverProvider)
(let ((buf (current-buffer)))
(eglot--async-request
(eglot--current-server-or-lose)
:textDocument/hover (eglot--TextDocumentPositionParams)
:success-fn (eglot--lambda ((Hover) contents range)
(eglot--when-buffer-window buf
(let* ((info (unless (seq-empty-p contents)
(eglot--hover-info contents range)))
(pos (and info (string-match "\n" info))))
(while (and pos (get-text-property pos 'invisible info))
(setq pos (string-match "\n" info (1+ pos))))
(funcall cb info :echo pos))))
:hint :textDocument/hover))
t))