GNU bug report logs - #61412
[PATCH] Add inlay hints to eglot

Previous Next

Package: emacs;

Reported by: Chinmay Dalal <dalal.chinmay.0101 <at> gmail.com>

Date: Sat, 11 Feb 2023 08:41:01 UTC

Severity: normal

Tags: patch

Merged with 61066

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 61412 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Chinmay Dalal <dalal.chinmay.0101 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 61412 <at> debbugs.gnu.org
Subject: Re: bug#61412: Inlay activation
Date: Wed, 15 Feb 2023 19:01:37 +0000
[Message part 1 (text/plain, inline)]
On Wed, Feb 15, 2023 at 6:56 PM Chinmay Dalal <dalal.chinmay.0101 <at> gmail.com>
wrote:

>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Cc: joaotavora <at> gmail.com
> >> From: Chinmay Dalal <dalal.chinmay.0101 <at> gmail.com>
> >> Date: Wed, 15 Feb 2023 21:54:57 +0530
> >>
> >> Regarding keybinding, on the github discussion someone suggested that
> >> vscode shows them while a key combination is held and hides them when
> >> they are released, but I was told emacs can't do this.
> >
> > Not only can we not do this, it is also not our style.  If we want to
> > show hints, we either show tooltips, or display a message in the echo
> > area.
>
> Tooltips and echo area can't be used as inlay hints are for showing
> types of multiple variables/expressions and names of parameters at once.
>
> See the attached screenshots for an example (this is from my
> implementation in this patch)
>

Yes, I was going to state the same thing. Hopefully your
screenshots illustrate why ElDoc, at least using its
its display methods available at the moment, is not
the best fit for this.

This is a very useful feature if done correctly, and I'm
leaning towards your approach of doing this completely
in eglot.el, so your code is an excellent start.

But the activation and other details have to be carefully
considered.  I will try to look into this soon.

Do you have a FSF copyright assignment, Chinmay?

João
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.