From 88e9d97119dbb8879b74634b88d1c8e7da2bb5a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 18 Aug 2018 12:26:55 +0100 Subject: [PATCH] Don't error if server replies with empty hover message * eglot.el (eglot-eldoc-function): Check non-nil contents. GitHub-reference: per https://github.com/joaotavora/eglot/issues/74 --- lisp/progmodes/eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6f3676117a7..3fd98c7d800 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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) -- 2.39.2