* eldoc-box.el (eldoc-box-eglot-help-at-point): Don’t display nil.
This commit is contained in:
parent
c18023132d
commit
43ec41dcc0
@ -475,12 +475,15 @@ If (point) != last point, cleanup frame.")
|
||||
(interactive)
|
||||
(when eglot--managed-mode
|
||||
(let ((eldoc-box-position-function #'eldoc-box--default-at-point-position-function))
|
||||
(eldoc-box--display
|
||||
(let ((hover-info
|
||||
(eglot--dbind ((Hover) contents range)
|
||||
(jsonrpc-request (eglot--current-server-or-lose) :textDocument/hover
|
||||
(eglot--TextDocumentPositionParams))
|
||||
(when (seq-empty-p contents) (eglot--error "No hover info here"))
|
||||
(eglot--hover-info contents range))))
|
||||
(if hover-info
|
||||
(eldoc-box--display hover-info)
|
||||
(eglot--error "No hover info here"))))
|
||||
(setq eldoc-box-eglot-help-at-point-last-point (point))
|
||||
(run-with-timer 0.1 nil #'eldoc-box--eglot-help-at-point-cleanup)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user