[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/eglot2emacs f8c8c70f8a 077/120: Reduce eldoc noise from hover me
From: |
João Távora |
Subject: |
feature/eglot2emacs f8c8c70f8a 077/120: Reduce eldoc noise from hover messages |
Date: |
Thu, 20 Oct 2022 07:16:58 -0400 (EDT) |
branch: feature/eglot2emacs
commit f8c8c70f8a7ec5649b5dd3f5af559f59eff65724
Author: jicksaw <jicksaw@pm.me>
Commit: GitHub <noreply@github.com>
Reduce eldoc noise from hover messages
Also close https://github.com/joaotavora/eglot/issues/985
Only echo hover response content, without response range.
LSP specification says the range is meant to visualize a hover.
Maybe echoing the range is useful for some, but it seems
non-standard behavior.
Example issue: haskell-language-server responds with range set to
whole file when hovering a comment -> Large, useless eldoc
* eglot.el (eglot--hover-info): Remove text selected by range from
output
Copyright-paperwork-exempt: Yes
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/514
---
lisp/progmodes/eglot.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index bde4a23f8e..b058183fb9 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2711,13 +2711,10 @@ for which LSP on-type-formatting should be requested."
(eglot--signal-textDocument/didChange)
(eldoc)))))))))
-(defun eglot--hover-info (contents &optional range)
- (let ((heading (and range (pcase-let ((`(,beg . ,end) (eglot--range-region
range)))
- (concat (buffer-substring beg end) ": "))))
- (body (mapconcat #'eglot--format-markup
- (if (vectorp contents) contents (list contents))
"\n")))
- (when (or heading (cl-plusp (length body))) (concat heading body))))
-
+(defun eglot--hover-info (contents &optional _range)
+ (mapconcat #'eglot--format-markup
+ (if (vectorp contents) contents (list contents)) "\n"))
+
(defun eglot--sig-info (sigs active-sig sig-help-active-param)
(cl-loop
for (sig . moresigs) on (append sigs nil) for i from 0
- feature/eglot2emacs f199060ee0 027/120: ; * eglot.el (eglot-server-initialized-hook): fix punctuation., (continued)
- feature/eglot2emacs f199060ee0 027/120: ; * eglot.el (eglot-server-initialized-hook): fix punctuation., João Távora, 2022/10/20
- feature/eglot2emacs 8b0ea132cb 035/120: * eglot.el (eglot--server-capable): don't use obsolete name., João Távora, 2022/10/20
- feature/eglot2emacs 469835a4f2 034/120: Obsolete eglot--plist-keys in favor of map-keys, João Távora, 2022/10/20
- feature/eglot2emacs 6dba74d8cb 051/120: Defend against broken move-to-column in recent emacs, João Távora, 2022/10/20
- feature/eglot2emacs 05418a1d83 054/120: Add omnisharp support for c#, João Távora, 2022/10/20
- feature/eglot2emacs c17c3cfcbf 064/120: Check textdocumentsync/willsave cap before sending it, João Távora, 2022/10/20
- feature/eglot2emacs 2dad9298d9 061/120: Rework eglot's mode-line, João Távora, 2022/10/20
- feature/eglot2emacs f9cfefcf89 063/120: Guess language-id if manually entering server program, João Távora, 2022/10/20
- feature/eglot2emacs 339ebe7ce4 065/120: Update invocation for out-of-box dart ls support, João Távora, 2022/10/20
- feature/eglot2emacs 46a480aa88 072/120: Fix egregious thinko in eglot--uri-to-path, João Távora, 2022/10/20
- feature/eglot2emacs f8c8c70f8a 077/120: Reduce eldoc noise from hover messages,
João Távora <=
- feature/eglot2emacs 9ffcd537f8 078/120: Apply any additionaltextedits unconditionally, João Távora, 2022/10/20
- feature/eglot2emacs b931d93b15 085/120: Guess the "lsp identifier at point", João Távora, 2022/10/20
- feature/eglot2emacs e5b021c01f 095/120: Fix jdtls support, João Távora, 2022/10/20
- feature/eglot2emacs a598352750 104/120: Allow eglot-workspace-configuration to be a plist, João Távora, 2022/10/20
- feature/eglot2emacs b633c29648 112/120: Rename "eglot -> eglot" in docstrings, João Távora, 2022/10/20
- feature/eglot2emacs 5b902b5cbb 110/120: Add support for "single server, multiple modes", João Távora, 2022/10/20
- feature/eglot2emacs 4071eaf8ad 116/120: * eglot.el (version): actually bump to 1.9, João Távora, 2022/10/20
- feature/eglot2emacs 9801e217f9 118/120: Rework header of eglot.el, João Távora, 2022/10/20
- feature/eglot2emacs 77f3157dcd 048/120: Use new jdtls script for eclipse jdt, João Távora, 2022/10/20
- feature/eglot2emacs 349f6b5f78 050/120: Don't advertise didchangewatchedfiles on tramp, João Távora, 2022/10/20