[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa d99a447 12/71: Close #439: Hide eldoc-message on e
From: |
João Távora |
Subject: |
[elpa] externals/elpa d99a447 12/71: Close #439: Hide eldoc-message on empty hover info |
Date: |
Wed, 16 Dec 2020 11:42:15 -0500 (EST) |
branch: externals/elpa
commit d99a4478a9ede56d8e0ccf03800d70a78d8142a6
Author: muffinmad <andreyk.mad@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Close #439: Hide eldoc-message on empty hover info
Co-authored-by: João Távora <joaotavora@gmail.com>
* eglot.el (eglot-eldoc-function): Pass nil to eglot--update-doc
on empty hover info.
(eglot--update-doc): Skip update eglot help buffer if string
is nil.
---
eglot.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/eglot.el b/eglot.el
index 13571d4..c485b4e 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2259,10 +2259,12 @@ Buffer is displayed with `display-buffer', which obeys
(defun eglot--update-doc (string hint)
"Put updated documentation STRING where it belongs.
Honours `eglot-put-doc-in-help-buffer'. HINT is used to
-potentially rename EGLOT's help buffer."
- (if (or (eq t eglot-put-doc-in-help-buffer)
- (and eglot-put-doc-in-help-buffer
- (funcall eglot-put-doc-in-help-buffer string)))
+potentially rename EGLOT's help buffer. If STRING is nil, the
+echo area cleared of any previous documentation."
+ (if (and string
+ (or (eq t eglot-put-doc-in-help-buffer)
+ (and eglot-put-doc-in-help-buffer
+ (funcall eglot-put-doc-in-help-buffer string))))
(with-current-buffer (eglot--help-buffer)
(let ((inhibit-read-only t)
(name (format "*eglot-help for %s*" hint)))
@@ -2314,10 +2316,10 @@ potentially rename EGLOT's help buffer."
:success-fn (eglot--lambda ((Hover) contents range)
(unless sig-showing
(when-buffer-window
- (when-let (info (and (not (seq-empty-p contents))
- (eglot--hover-info contents
- range)))
- (eglot--update-doc info thing-at-point)))))
+ (eglot--update-doc (and (not (seq-empty-p contents))
+ (eglot--hover-info contents
+ range))
+ thing-at-point))))
:deferred :textDocument/hover))
(when (eglot--server-capable :documentHighlightProvider)
(jsonrpc-async-request
- [elpa] branch externals/elpa created (now 4edd478), João Távora, 2020/12/16
- [elpa] externals/elpa 8b94cf4 02/71: Per #397: Add new eglot-lsp-abiding-column test, João Távora, 2020/12/16
- [elpa] externals/elpa 1056ef5 03/71: Close #413: update dependencies and copyright years, João Távora, 2020/12/16
- [elpa] externals/elpa d99a447 12/71: Close #439: Hide eldoc-message on empty hover info,
João Távora <=
- [elpa] externals/elpa af32ebf 06/71: Close #444: use text-mode for plaintext markup, João Távora, 2020/12/16
- [elpa] externals/elpa ef6c483 13/71: Fix #452: also check types when destructuring LSP objects, João Távora, 2020/12/16
- [elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-echo-area-use-multiline-p, João Távora, 2020/12/16
- [elpa] externals/elpa 22aa27c 01/71: Close #397: Simplify a bit of code, João Távora, 2020/12/16
- [elpa] externals/elpa 8900a35 04/71: Prevent "Cant guess python-indent-offset..." messages in tests, João Távora, 2020/12/16
- [elpa] externals/elpa dd48f4a 08/71: * eglot.el (eglot-put-doc-in-help-buffer): Tiny docstring fix., João Távora, 2020/12/16
- [elpa] externals/elpa e5cf30e 09/71: Close #435: create match xrefs when possible, João Távora, 2020/12/16
- [elpa] externals/elpa ad3f049 24/71: Close #417: minimally document relation with project.el, João Távora, 2020/12/16
- [elpa] externals/elpa 2f75da2 28/71: Fix #460: fix "free variable" warning, João Távora, 2020/12/16
- [elpa] externals/elpa 0f57efb 26/71: Simplify bug-reporting instructions, João Távora, 2020/12/16