Skip to content

Commit

Permalink
Per joaotavora#74: Don't error if server replies with empty hover mes…
Browse files Browse the repository at this point in the history
…sage

* eglot.el (eglot-eldoc-function): Check non-nil contents.
  • Loading branch information
joaotavora committed Aug 18, 2018
1 parent 8e0cf60 commit c0f9db7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,9 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp."
:success-fn (jsonrpc-lambda (&key contents range)
(unless sig-showing
(when-buffer-window
(when-let (info (eglot--hover-info contents range))
(when-let (info (and contents
(eglot--hover-info contents
range)))
(eldoc-message info)))))
:deferred :textDocument/hover))
(when (eglot--server-capable :documentHighlightProvider)
Expand Down

0 comments on commit c0f9db7

Please sign in to comment.