GNU bug report logs -
#61764
29.0.60; eglot show incomplete inlay hints
Previous Next
Reported by: Kai Ma <justksqsf <at> gmail.com>
Date: Fri, 24 Feb 2023 17:11:02 UTC
Severity: normal
Found in version 29.0.60
Fixed in version 29.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61764 in the body.
You can then email your comments to 61764 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61764
; Package
emacs
.
(Fri, 24 Feb 2023 17:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kai Ma <justksqsf <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 24 Feb 2023 17:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The display of some inlay hints are not complete. For example, in a
Rust source file:
let v = vec![1i32];
The expected display is:
let v: Vec<i32> = ...;
However, the current eglot (commit 55d29c9bacb in branch emacs-29) only
shows the semicolon:
let v: = ...;
I found that the inlay hint returned by rust-analyzer is something like:
([(:value ": ") (:value "Vec" :location ...) (:value "<i32>")])
And I can confirm that by making the following change, the inlay hints
from rust-analyzer will be displayed correctly.
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3549,7 +3549,7 @@ eglot--update-hints-1
(left-pad (and paddingLeft (not (memq (char-before) '(32 9)))))
(right-pad (and paddingRight (not (memq (char-after) '(32 9)))))
(text (if (stringp label)
- label (plist-get (elt label 0) :value))))
+ label (mapconcat (lambda (plist) (plist-get plist :value)) label))))
(overlay-put ov 'before-string
(propertize
(concat (and left-pad " ") text (and right-pad " "))
According to the LSP spec [1], the intention of this design is to
support the use case where a LSP client shows different information for
each part. Therefore, I believe this (concatenation) is the correct
thing to do, regardless of whether eglot supports hovering.
[1] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHint
Kai
bug Marked as fixed in versions 29.1.
Request was from
Kai Ma <justksqsf <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 01 Mar 2023 07:51:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Tue, 05 Sep 2023 23:28:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kai Ma <justksqsf <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 05 Sep 2023 23:28:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 61764-done <at> debbugs.gnu.org (full text, mbox):
Kai Ma <justksqsf <at> gmail.com> writes:
> fixed 61764 29.1
> quit
I assume that means you can no longer see the issue, so I'm closing this
bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 04 Oct 2023 11:24:31 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.