GNU bug report logs - #61066
[PATCH] Add inlay hint support to eglot

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dimitri Belopopsky <dimitri@HIDDEN>; Keywords: patch; merged with #61412; dated Wed, 25 Jan 2023 22:35:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 61066 61412. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 61066 <at> debbugs.gnu.org:


Received: (at 61066) by debbugs.gnu.org; 28 Jan 2023 01:59:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 27 20:59:05 2023
Received: from localhost ([127.0.0.1]:39203 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pLaUj-0006vi-EY
	for submit <at> debbugs.gnu.org; Fri, 27 Jan 2023 20:59:05 -0500
Received: from mail-wm1-f52.google.com ([209.85.128.52]:54948)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1pLaUg-0006vE-JF
 for 61066 <at> debbugs.gnu.org; Fri, 27 Jan 2023 20:59:05 -0500
Received: by mail-wm1-f52.google.com with SMTP id m15so4649860wms.4
 for <61066 <at> debbugs.gnu.org>; Fri, 27 Jan 2023 17:59:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=NRzPBKRNywJ0MdiSwGdkQgdo5w+hEinMjXGjwlS7HEg=;
 b=U5ctEiTaLRHzcHKavllPyQdLTU60KUIEe59ALS/h34GhMsQXhyk73p9Ze7xoLCKOCd
 ukeUlsSiGJgn6lrDJNSkTXJm6LLzhOimbEFF/MFUPlNRxuD2BKat1kBx6nVMe6IH2jDL
 1llPfrZSwOJmCLvTj4m5ORHuQnw7NcGGyFHCpgdPrQ7G+FXGdyrlFJtog2WNmnCnCZrg
 ZGeXOfrjALcADqgcbHIu8491a1xQOIHGZiJxfaEjRJQYWCK7cVByGra/mQnXGBISH0XY
 TW4fZ/WorvQE9GBXFu5GaexuDxY5xp9y9crssMVu+H4WtTViZCtYmQuna2bNZ66dF338
 4uow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=NRzPBKRNywJ0MdiSwGdkQgdo5w+hEinMjXGjwlS7HEg=;
 b=BZwEmf7mUk+yotYl7MU8eN65M17LpsWDyLvvh+4EsBuKgc83hLCJBtQcwqLBTBfnSF
 8mQnznZbTE/82Eki76X34HJ1V9kR8SBm2ciOVk7NEnp8UMqniJvrwmdQMbG297I6++zP
 IH1yVpME12dlAQxknf6ZezCxIRd/DIQvxPsziNooBaIJxrd8M6TEzuRk3KMVNdC4wQo+
 wyegFYRQbtw3+biy7HTp3iieVJXXRg1bwTe8V16ILYj6RIfzvaUQCVmN3g9PC90yi5Kg
 L1OkWYC5UuZvp/wHq3uOtesJ6KArSRU0bylrx83e3MDXtdIWj6GJE1841W29BxKUFJJW
 3pbQ==
X-Gm-Message-State: AO0yUKUNSZBbH/TCqENdZUaxu+/Xg600chb3dwQfwYAIDMmnD77A2O1K
 OEZWtdFA+qIAomjL56eT6qY=
X-Google-Smtp-Source: AK7set8P2tYRtbMN0x7UZW4eCNU5gQZqePSH1B9nk1pJi5yLtxUNg5UmrwPGUiaqVPj10rfwrkxLAg==
X-Received: by 2002:a05:600c:22d4:b0:3dc:47f4:a022 with SMTP id
 20-20020a05600c22d400b003dc47f4a022mr632818wmg.25.1674871136584; 
 Fri, 27 Jan 2023 17:58:56 -0800 (PST)
Received: from [192.168.0.2] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 f24-20020a05600c491800b003dc0cb5e3f1sm5525283wmp.46.2023.01.27.17.58.55
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 27 Jan 2023 17:58:56 -0800 (PST)
Message-ID: <2a80546d-551e-7989-b3c7-33fe1538a861@HIDDEN>
Date: Sat, 28 Jan 2023 03:58:53 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
Subject: Re: bug#61066: [PATCH] Add inlay hint support to eglot
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>, Dimitri Belopopsky
 <dimitri@HIDDEN>, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?=
 <joaotavora@HIDDEN>
References: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
 <83a625g66p.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <83a625g66p.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 61066
Cc: 61066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

On 26/01/2023 08:29, Eli Zaretskii wrote:
> AFAIU, inlay hints provide information of the same kind as ElDoc and
> in similar manner from the display and UX POV.  So I think this
> feature should work via ElDoc, not as a separate from-the-scratch
> implementation.

IIUC the "inlay hints" are about different information.

Information that is not determined by the position of point.

For example, annotating variable declarations with specific types in a 
language that infers types, here's a screenshot: 
https://user-images.githubusercontent.com/2771466/71774757-54269200-2fc8-11ea-8505-ac2f326761ca.png

Or adding parameter types (or names) inside function calls, example: 
https://user-images.githubusercontent.com/2303841/35807174-43bc0c3c-0a82-11e8-8c99-591fb650e1e0.png

So I don't think this fits Eldoc's protocol.

You were probably thinking of signature help (that was my initial 
impression as well).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61066; Package emacs. Full text available.

Message received at 61066 <at> debbugs.gnu.org:


Received: (at 61066) by debbugs.gnu.org; 27 Jan 2023 18:45:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 27 13:45:03 2023
Received: from localhost ([127.0.0.1]:38436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pLTig-0003Jd-Jq
	for submit <at> debbugs.gnu.org; Fri, 27 Jan 2023 13:45:03 -0500
Received: from mail-qk1-f176.google.com ([209.85.222.176]:35433)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dimitribelo@HIDDEN>) id 1pLTid-0003Ip-DL
 for 61066 <at> debbugs.gnu.org; Fri, 27 Jan 2023 13:45:01 -0500
Received: by mail-qk1-f176.google.com with SMTP id t9so2774979qkm.2
 for <61066 <at> debbugs.gnu.org>; Fri, 27 Jan 2023 10:44:59 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=7qC2GWAYEbpXR8aiYp7FgNEsAN54hfH+npkohqlZsDI=;
 b=vF8O0B7efyGERKbVAg1N/U7zeCPfaBAxCU04mDxZhl+FWwRUFvJ1o19n1CPxQT/Trj
 wsIWufOz3WsVoYmYp5tUWrM6docDf2hhhkCz94uLouF5GsxUNjpKsQx7vloBtyw+h2eX
 5jzN6NYUX6jKq5ZFKWcXHeUg5qMpUkYidLm+IqP+TO0RELglakkB7OFnYOvE3fyTaVZK
 kSW+hkkPZ/GRVsmS7nSw9nsBx7GYJU7JTcc6e7x4NfJyWwV58YGV7hK20MiX5VNplj6n
 jwmIAr6mBHBmYlpESIdkifd8xSfkH67rCJq8LtJRh0619A/w0MsXVvAqc60UAfUFhsEF
 7zyA==
X-Gm-Message-State: AFqh2kpWyqZV/lHcjtWOFecx6+2+ohhDE04B+s8gCpCD/8o1l8iuPyyY
 cduKNUJZKNagXZGXsHghSyztd36BALuHRV3QOzJv9Xbm
X-Google-Smtp-Source: AMrXdXvibWWKQrFRfmI+ADoIal8w03LXUOwkauOnMgAzLvX5tjSzwopDdV8284W/Kpaa4B2V+YJhoKVNG3Hxr0MydWw=
X-Received: by 2002:a05:620a:34e:b0:705:b333:c90c with SMTP id
 t14-20020a05620a034e00b00705b333c90cmr1297036qkm.378.1674845093869; Fri, 27
 Jan 2023 10:44:53 -0800 (PST)
MIME-Version: 1.0
References: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
 <83a625g66p.fsf@HIDDEN>
 <CALDnm50xRQ_DzEo51DP5WgVWJo-kfN15ZCfEY7ARmKE3WzU5bw@HIDDEN>
In-Reply-To: <CALDnm50xRQ_DzEo51DP5WgVWJo-kfN15ZCfEY7ARmKE3WzU5bw@HIDDEN>
From: Dimitri Belopopsky <dimitri@HIDDEN>
Date: Fri, 27 Jan 2023 19:44:42 +0100
Message-ID: <CA+46MXY+VKrC-aoVB7SGutMAQ8B8ycnb773RWgOrG7qSxo7YsA@HIDDEN>
Subject: Re: bug#61066: [PATCH] Add inlay hint support to eglot
To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000dfbe2c05f3434252"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 61066
Cc: Eli Zaretskii <eliz@HIDDEN>, 61066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--000000000000dfbe2c05f3434252
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

I don't have much experience with hacking emacs, but I was thinking the
current code could also be reused
for the code lens LSP feature. Maybe there are other features that could be
done with the same kind
of setup?

This (to me anyway) would probably mean eldoc isn't the best option for a
more general solution.
Though I expect having overlays for eldoc would be beneficial as well.

I don't really know which is best between a library or integration inside
flymake. I might try out both
ideas, as I have no experience with either of them. My guess flymake sounds
easier to implement, but
a support library could probably be more flexible for reuse?

Dimitri

On Thu, 26 Jan 2023 at 13:29, Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> =
wrote:

> On Thu, Jan 26, 2023 at 6:28 AM Eli Zaretskii <eliz@HIDDEN> wrote:
>
>> > From: Dimitri Belopopsky <dimitri@HIDDEN>
>> > Date: Wed, 25 Jan 2023 23:34:02 +0100
>> >
>> > I've been working on adding support for inlay hints inside eglot using
>> overlays.
>> > Here is a working patch, but I'm still missing a few things:
>> >
>> > - I can't figure out a way to show the hints on a document without
>> causing lags or timeouts from the lsp
>> > server
>> > - I'm currently updating the hints by sending the whole file each time
>> (to make sure all hints get updated
>> > correctly). I'm not sure on how to make this more efficient (or if it
>> even necessary).
>> >
>> > On the implementation side:
>> > - implemented with overlays as a minor model, enabled by default
>> > - shows all hints supported by the protocol
>> > - there is a customisation to disable the minor mode if the user
>> doesn't want the feature
>> >
>> > I'd love to get a few points to finish this patch, and of course any
>> ideas and feedbacks are welcome!
>>
>> Thank you for working on this important feature.
>>
>> AFAIU, inlay hints provide information of the same kind as ElDoc and
>> in similar manner from the display and UX POV.  So I think this
>> feature should work via ElDoc, not as a separate from-the-scratch
>> implementation.  ElDoc is already capable of using Eglot-supplied
>> information, so perhaps the only feature we need to add is the
>> capability of ElDoc to (optionally) display the information in
>> overlays near point.  (I thought we already had such a capability in
>> eldoc.el, but it looks like I was dreaming, because I cannot find it
>> there.)
>>
>> The advantage of basing this on ElDoc is that then we will be able to
>> provide similar features from information sources other than Eglot.
>>
>> Jo=C3=A3o, WDYT?
>>
>
> I think you're mostly right in your analysis.  I also think this should b=
e
> provided
> via some LSP-agnostic infrastructure and not as a separate
> from-the-scratch
> implementation, as you put it. This is (and was) also my stance in other
> similar
> matters.
>
> The devil is in the details, of course.  Is eldoc.el the right
> infrastructure
> for it. What augmentation does it need, if any?  Are these augmentations
> practical given the relative size, complexity and history of eldoc.el?
> Isn't
> an "inlay.el" or a "little-hint.el" support library a better choice? Or
> maybe
> flymake.el with it's use of overlay-based annotations is also acceptable
> here?  I don't (yet) have answers to these questions.
>
> Of course the existence of this prototype by Dimitri is certainly
> No Bad Thing and a good starting point.
>
> Jo=C3=A3o
>

--000000000000dfbe2c05f3434252
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello,<br><br>I don&#39;t have much experience with h=
acking emacs, but I was thinking the current code could also be reused</div=
><div>for the code lens LSP feature. Maybe there are other features that co=
uld be done with the same kind<br></div><div>of setup?<br><br></div><div>Th=
is (to me anyway) would probably mean eldoc isn&#39;t the best option for a=
 more general solution.</div><div>Though I expect having overlays for eldoc=
 would be beneficial as well.<br><br></div><div>I don&#39;t really know whi=
ch is best between a library or integration inside flymake. I might try out=
 both</div><div>ideas, as I have no experience with either of them. My gues=
s flymake sounds easier to implement, but</div><div>a support library could=
 probably be more flexible for reuse?<br><br></div><div>Dimitri<br></div></=
div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On=
 Thu, 26 Jan 2023 at 13:29, Jo=C3=A3o T=C3=A1vora &lt;<a href=3D"mailto:joa=
otavora@HIDDEN">joaotavora@HIDDEN</a>&gt; wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail=
_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jan 26, 2023 at 6:28 =
AM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz=
@gnu.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex">&gt; From: Dimitri Belopopsky &lt;<a href=3D"mailto:dimitri@belopop=
sky.com" target=3D"_blank">dimitri@HIDDEN</a>&gt;<br>
&gt; Date: Wed, 25 Jan 2023 23:34:02 +0100<br>
&gt; <br>
&gt; I&#39;ve been working on adding support for inlay hints inside eglot u=
sing overlays.<br>
&gt; Here is a working patch, but I&#39;m still missing a few things:<br>
&gt; <br>
&gt; - I can&#39;t figure out a way to show the hints on a document without=
 causing lags or timeouts from the lsp<br>
&gt; server<br>
&gt; - I&#39;m currently updating the hints by sending the whole file each =
time (to make sure all hints get updated<br>
&gt; correctly). I&#39;m not sure on how to make this more efficient (or if=
 it even necessary).<br>
&gt; <br>
&gt; On the implementation side:<br>
&gt; - implemented with overlays as a minor model, enabled by default<br>
&gt; - shows all hints supported by the protocol<br>
&gt; - there is a customisation to disable the minor mode if the user doesn=
&#39;t want the feature<br>
&gt; <br>
&gt; I&#39;d love to get a few points to finish this patch, and of course a=
ny ideas and feedbacks are welcome!<br>
<br>
Thank you for working on this important feature.<br>
<br>
AFAIU, inlay hints provide information of the same kind as ElDoc and<br>
in similar manner from the display and UX POV.=C2=A0 So I think this<br>
feature should work via ElDoc, not as a separate from-the-scratch<br>
implementation.=C2=A0 ElDoc is already capable of using Eglot-supplied<br>
information, so perhaps the only feature we need to add is the<br>
capability of ElDoc to (optionally) display the information in<br>
overlays near point.=C2=A0 (I thought we already had such a capability in<b=
r>
eldoc.el, but it looks like I was dreaming, because I cannot find it<br>
there.)<br>
<br>
The advantage of basing this on ElDoc is that then we will be able to<br>
provide similar features from information sources other than Eglot.<br>
<br>
Jo=C3=A3o, WDYT?<br>
</blockquote></div><div><br></div><div>I think you&#39;re mostly right in y=
our analysis.=C2=A0 I also think this should be provided <br></div><div>via=
 some LSP-agnostic infrastructure and not as a separate from-the-scratch <b=
r></div><div>implementation, as you put it. This is (and was) also my stanc=
e in other similar <br></div><div>matters.</div><div><br></div><div>The dev=
il is in the details, of course.=C2=A0 Is eldoc.el the right infrastructure=
</div><div>for it. What augmentation does it need, if any?=C2=A0 Are these =
augmentations</div><div>practical given the relative size, complexity and h=
istory of eldoc.el? Isn&#39;t <br></div><div>an &quot;inlay.el&quot; or a &=
quot;little-hint.el&quot; support library a better choice? Or maybe <br></d=
iv><div>flymake.el with it&#39;s use of overlay-based annotations is also a=
cceptable <br></div><div>here?=C2=A0 I don&#39;t (yet) have answers to thes=
e questions.</div><div><br></div><div>Of course the existence of this proto=
type by Dimitri is certainly <br></div><div>No Bad Thing and a good startin=
g point.<br></div><div><br></div><div>Jo=C3=A3o<br></div></div>
</blockquote></div>

--000000000000dfbe2c05f3434252--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61066; Package emacs. Full text available.

Message received at 61066 <at> debbugs.gnu.org:


Received: (at 61066) by debbugs.gnu.org; 26 Jan 2023 12:29:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 26 07:29:31 2023
Received: from localhost ([127.0.0.1]:60934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pL1Nj-0007Kv-6C
	for submit <at> debbugs.gnu.org; Thu, 26 Jan 2023 07:29:31 -0500
Received: from mail-oa1-f46.google.com ([209.85.160.46]:35711)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1pL1Nh-0007Kh-BE
 for 61066 <at> debbugs.gnu.org; Thu, 26 Jan 2023 07:29:29 -0500
Received: by mail-oa1-f46.google.com with SMTP id
 586e51a60fabf-15085b8a2f7so2188833fac.2
 for <61066 <at> debbugs.gnu.org>; Thu, 26 Jan 2023 04:29:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=L9HHKHSq6Wa7wTLj3TTHeScU2oHbsaN7J4Jrk0TrGvQ=;
 b=FT1SrbDJ/L2HEsRoD9b2u9xPu4uj/BT7+dvzK3KyPee/VBeWuYL9Nq373erXhqRWLZ
 JpB5JeoHKnvx5wHkljzzUBItvqNdkpY1lx4E8hwvK8FApKndQojZcNQEsjAA9VqkY1g/
 ONADrAzWOQ1KbZCKU/xbCDVCFaV1UsUhVX/dQoWGRYg9IE+rVhWmNnjSv5JYkGhhuj/Q
 aibWWxEDegIyVxaql1hSrqGBzcwVl9kUhUM9kg3XhqdtSi5sCyfx7Hki6KE6GqhkI9by
 faI8qUaC4fch4JgKvnn+JPY9vQk23n9HWkqhomn9M0VXS1jxEzbtJKASP5OD5gKzMO/A
 o9Lw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=L9HHKHSq6Wa7wTLj3TTHeScU2oHbsaN7J4Jrk0TrGvQ=;
 b=vjxA4/RlhWz6fhG2SUGEOW4Lf3yzN5OQ4BjsLjFDY+T9ujggeJcQmN68k4ZwdvYZBP
 PY7jpSyKtbGsdqrAznLbknYf86ZRC578Zx9HF++XP5ZDFT0k1kPL3j4n7aTpGXK4uOuJ
 XKfv9VX1yUvJkLbJ550DEHRFyJytm6rFKxCbwYc1ExC3GM5Hafc9XDwsVjJ1POUx+95Z
 E4zMIeW+P2Z8IyfJbrJ0/xA1WLLRjTcEKYTS0TWkb3t5/BvGShU95fEophdZbYjiC2Eq
 Bz+ICc1BLbctgzuLVkXSrGbYLxC3dQapV36VSy+5vXa0ra/BD7HzXGnEbnmoE4ndmRK4
 KggQ==
X-Gm-Message-State: AFqh2krXjdEXxqPzapdD7WYrJ+zdV5txGhZpIQqoPEpOvlwsMlRlY2nx
 I5eNQ0KYXoo6z1A0w+i8w5A26sOcfIzg5cqtPy4=
X-Google-Smtp-Source: AMrXdXv9poGdQtwuPIbchJTU4CrLfGweWRdnYjbi9cXwTWpmXMjbhhYhW/AVspguO6SyOnWWYTWM5G3HJI2PiXpxfzw=
X-Received: by 2002:a05:6870:9d92:b0:15f:2ddd:80cf with SMTP id
 pv18-20020a0568709d9200b0015f2ddd80cfmr2323815oab.171.1674736163583; Thu, 26
 Jan 2023 04:29:23 -0800 (PST)
MIME-Version: 1.0
References: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
 <83a625g66p.fsf@HIDDEN>
In-Reply-To: <83a625g66p.fsf@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Thu, 26 Jan 2023 12:30:55 +0000
Message-ID: <CALDnm50xRQ_DzEo51DP5WgVWJo-kfN15ZCfEY7ARmKE3WzU5bw@HIDDEN>
Subject: Re: bug#61066: [PATCH] Add inlay hint support to eglot
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000001f7bc205f329e641"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61066
Cc: Dimitri Belopopsky <dimitri@HIDDEN>, 61066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000001f7bc205f329e641
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 26, 2023 at 6:28 AM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Dimitri Belopopsky <dimitri@HIDDEN>
> > Date: Wed, 25 Jan 2023 23:34:02 +0100
> >
> > I've been working on adding support for inlay hints inside eglot using
> overlays.
> > Here is a working patch, but I'm still missing a few things:
> >
> > - I can't figure out a way to show the hints on a document without
> causing lags or timeouts from the lsp
> > server
> > - I'm currently updating the hints by sending the whole file each time
> (to make sure all hints get updated
> > correctly). I'm not sure on how to make this more efficient (or if it
> even necessary).
> >
> > On the implementation side:
> > - implemented with overlays as a minor model, enabled by default
> > - shows all hints supported by the protocol
> > - there is a customisation to disable the minor mode if the user doesn'=
t
> want the feature
> >
> > I'd love to get a few points to finish this patch, and of course any
> ideas and feedbacks are welcome!
>
> Thank you for working on this important feature.
>
> AFAIU, inlay hints provide information of the same kind as ElDoc and
> in similar manner from the display and UX POV.  So I think this
> feature should work via ElDoc, not as a separate from-the-scratch
> implementation.  ElDoc is already capable of using Eglot-supplied
> information, so perhaps the only feature we need to add is the
> capability of ElDoc to (optionally) display the information in
> overlays near point.  (I thought we already had such a capability in
> eldoc.el, but it looks like I was dreaming, because I cannot find it
> there.)
>
> The advantage of basing this on ElDoc is that then we will be able to
> provide similar features from information sources other than Eglot.
>
> Jo=C3=A3o, WDYT?
>

I think you're mostly right in your analysis.  I also think this should be
provided
via some LSP-agnostic infrastructure and not as a separate from-the-scratch
implementation, as you put it. This is (and was) also my stance in other
similar
matters.

The devil is in the details, of course.  Is eldoc.el the right
infrastructure
for it. What augmentation does it need, if any?  Are these augmentations
practical given the relative size, complexity and history of eldoc.el?
Isn't
an "inlay.el" or a "little-hint.el" support library a better choice? Or
maybe
flymake.el with it's use of overlay-based annotations is also acceptable
here?  I don't (yet) have answers to these questions.

Of course the existence of this prototype by Dimitri is certainly
No Bad Thing and a good starting point.

Jo=C3=A3o

--0000000000001f7bc205f329e641
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Thu, Jan 26, 2023 at 6:28 AM Eli Zaretskii &lt;<a href=3D"mailto:=
eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">&gt; From: Dimitri Belopopsky &lt;<a href=3D"mail=
to:dimitri@HIDDEN" target=3D"_blank">dimitri@HIDDEN</a>&gt;=
<br>
&gt; Date: Wed, 25 Jan 2023 23:34:02 +0100<br>
&gt; <br>
&gt; I&#39;ve been working on adding support for inlay hints inside eglot u=
sing overlays.<br>
&gt; Here is a working patch, but I&#39;m still missing a few things:<br>
&gt; <br>
&gt; - I can&#39;t figure out a way to show the hints on a document without=
 causing lags or timeouts from the lsp<br>
&gt; server<br>
&gt; - I&#39;m currently updating the hints by sending the whole file each =
time (to make sure all hints get updated<br>
&gt; correctly). I&#39;m not sure on how to make this more efficient (or if=
 it even necessary).<br>
&gt; <br>
&gt; On the implementation side:<br>
&gt; - implemented with overlays as a minor model, enabled by default<br>
&gt; - shows all hints supported by the protocol<br>
&gt; - there is a customisation to disable the minor mode if the user doesn=
&#39;t want the feature<br>
&gt; <br>
&gt; I&#39;d love to get a few points to finish this patch, and of course a=
ny ideas and feedbacks are welcome!<br>
<br>
Thank you for working on this important feature.<br>
<br>
AFAIU, inlay hints provide information of the same kind as ElDoc and<br>
in similar manner from the display and UX POV.=C2=A0 So I think this<br>
feature should work via ElDoc, not as a separate from-the-scratch<br>
implementation.=C2=A0 ElDoc is already capable of using Eglot-supplied<br>
information, so perhaps the only feature we need to add is the<br>
capability of ElDoc to (optionally) display the information in<br>
overlays near point.=C2=A0 (I thought we already had such a capability in<b=
r>
eldoc.el, but it looks like I was dreaming, because I cannot find it<br>
there.)<br>
<br>
The advantage of basing this on ElDoc is that then we will be able to<br>
provide similar features from information sources other than Eglot.<br>
<br>
Jo=C3=A3o, WDYT?<br>
</blockquote></div><div><br></div><div>I think you&#39;re mostly right in y=
our analysis.=C2=A0 I also think this should be provided <br></div><div>via=
 some LSP-agnostic infrastructure and not as a separate from-the-scratch <b=
r></div><div>implementation, as you put it. This is (and was) also my stanc=
e in other similar <br></div><div>matters.</div><div><br></div><div>The dev=
il is in the details, of course.=C2=A0 Is eldoc.el the right infrastructure=
</div><div>for it. What augmentation does it need, if any?=C2=A0 Are these =
augmentations</div><div>practical given the relative size, complexity and h=
istory of eldoc.el? Isn&#39;t <br></div><div>an &quot;inlay.el&quot; or a &=
quot;little-hint.el&quot; support library a better choice? Or maybe <br></d=
iv><div>flymake.el with it&#39;s use of overlay-based annotations is also a=
cceptable <br></div><div>here?=C2=A0 I don&#39;t (yet) have answers to thes=
e questions.</div><div><br></div><div>Of course the existence of this proto=
type by Dimitri is certainly <br></div><div>No Bad Thing and a good startin=
g point.<br></div><div><br></div><div>Jo=C3=A3o<br></div></div>

--0000000000001f7bc205f329e641--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61066; Package emacs. Full text available.

Message received at 61066 <at> debbugs.gnu.org:


Received: (at 61066) by debbugs.gnu.org; 26 Jan 2023 06:28:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 26 01:28:56 2023
Received: from localhost ([127.0.0.1]:60415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pKvkm-0003Oy-7d
	for submit <at> debbugs.gnu.org; Thu, 26 Jan 2023 01:28:56 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pKvkk-0003Oj-JL
 for 61066 <at> debbugs.gnu.org; Thu, 26 Jan 2023 01:28:55 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pKvke-0007OZ-0Z; Thu, 26 Jan 2023 01:28:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=VW1E+xQfxPP/57/qxySfPfIPQQ2ObVv8PqX8iRN9foQ=; b=fQrxumrFB40LTghp6Q6k
 xV/nayS82gxtn3U8S+037SiGCsNzqeaiSrqvtjWnfG91XgnxFsJDAtZaDbfisMKw+1Y/dSZ6NyNbP
 XpzHhoyPM15aPV0aELq/VB1odxZoKrt76vbHA82aa+JVG1beQxPBf6IMh8025t5TyRCds/v2h+FJS
 IOlvMMzuTYkUztr74v0lrCOsKoTnpyobdqQIAtsaHWjHqRMcQV8mn+QS/bChX3XwqVXQXfJW1EJxt
 yJT+rzQmMCVW8WuK2Sa08NVJtTrXTtXBDDWl2L1+jse23XQrd77GjCBymrJB7uggE5682dS/YCwyk
 c9azGGkiSckkUQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pKvkd-0002QB-AL; Thu, 26 Jan 2023 01:28:47 -0500
Date: Thu, 26 Jan 2023 08:29:02 +0200
Message-Id: <83a625g66p.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dimitri Belopopsky <dimitri@HIDDEN>,
 =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
In-Reply-To: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
 (message from Dimitri Belopopsky on Wed, 25 Jan 2023 23:34:02 +0100)
Subject: Re: bug#61066: [PATCH] Add inlay hint support to eglot
References: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61066
Cc: 61066 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Dimitri Belopopsky <dimitri@HIDDEN>
> Date: Wed, 25 Jan 2023 23:34:02 +0100
> 
> I've been working on adding support for inlay hints inside eglot using overlays.
> Here is a working patch, but I'm still missing a few things:
> 
> - I can't figure out a way to show the hints on a document without causing lags or timeouts from the lsp
> server
> - I'm currently updating the hints by sending the whole file each time (to make sure all hints get updated
> correctly). I'm not sure on how to make this more efficient (or if it even necessary).
> 
> On the implementation side:
> - implemented with overlays as a minor model, enabled by default
> - shows all hints supported by the protocol
> - there is a customisation to disable the minor mode if the user doesn't want the feature
> 
> I'd love to get a few points to finish this patch, and of course any ideas and feedbacks are welcome!

Thank you for working on this important feature.

AFAIU, inlay hints provide information of the same kind as ElDoc and
in similar manner from the display and UX POV.  So I think this
feature should work via ElDoc, not as a separate from-the-scratch
implementation.  ElDoc is already capable of using Eglot-supplied
information, so perhaps the only feature we need to add is the
capability of ElDoc to (optionally) display the information in
overlays near point.  (I thought we already had such a capability in
eldoc.el, but it looks like I was dreaming, because I cannot find it
there.)

The advantage of basing this on ElDoc is that then we will be able to
provide similar features from information sources other than Eglot.

João, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61066; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Jan 2023 22:34:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 25 17:34:34 2023
Received: from localhost ([127.0.0.1]:60160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pKoLi-00080T-BS
	for submit <at> debbugs.gnu.org; Wed, 25 Jan 2023 17:34:34 -0500
Received: from lists.gnu.org ([209.51.188.17]:60080)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dimitribelo@HIDDEN>) id 1pKoLe-00080J-Da
 for submit <at> debbugs.gnu.org; Wed, 25 Jan 2023 17:34:32 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dimitribelo@HIDDEN>)
 id 1pKoLS-00021R-M5
 for bug-gnu-emacs@HIDDEN; Wed, 25 Jan 2023 17:34:25 -0500
Received: from mail-qk1-f171.google.com ([209.85.222.171])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <dimitribelo@HIDDEN>)
 id 1pKoLO-0000gs-Tt
 for bug-gnu-emacs@HIDDEN; Wed, 25 Jan 2023 17:34:16 -0500
Received: by mail-qk1-f171.google.com with SMTP id l1so74547qkg.11
 for <bug-gnu-emacs@HIDDEN>; Wed, 25 Jan 2023 14:34:14 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=QNtLsymABkjYRq0aYCtV5R7pDJw8aez+nUUEqDYznyI=;
 b=McA565CuiixwHYJ8qcqWs2wR2jtEjl9sXgfRRkcklEQiyrgq0HjZuM+N8px5YxN/EB
 tTJEa2jtCGux+qBtoMQiAGxpeC7Uik3DXJ7kz4B0R454lN96P1KlZz8kov7XYBlFLX83
 Pk/6SiyMScL6CXOflpNpca3DrLhZw+BnUif9mcCiiX6G0GDZp3cADKodHzobF75dqv15
 3NoGnM/Ib5vU2SE3sOcxGv4m/ZtOIfDlzJjB1wvGcNmVvDuOO/nAFrKst+LSjy1Y0FW2
 jJZ8NUa/dCUZOUua18Qo5EyUvhg3QMS0XlMlZ5msNZ2ANq1WJjE9+BeGvAkcq0n8l1R3
 g9CA==
X-Gm-Message-State: AO0yUKVatlkJlri+Yxd0qjuplrFxBbwcn8Mf8SfH8XCL6bBq2dNoGJ+5
 ZugSYJCyBqMELb+7BnItqVqhmKTajJQS9va6rsf+RKDg
X-Google-Smtp-Source: AK7set/K3dOBEnuUC+3D/Ux0/7Vl9jwQuAmN5Tsbbk7iS3dbTwcQnTcX9LjrmEm+lNDVJnFDY2AqWHGlKhQJLfZIm+Q=
X-Received: by 2002:a05:620a:1332:b0:710:2b0c:9f68 with SMTP id
 p18-20020a05620a133200b007102b0c9f68mr335561qkj.520.1674686053172; Wed, 25
 Jan 2023 14:34:13 -0800 (PST)
MIME-Version: 1.0
From: Dimitri Belopopsky <dimitri@HIDDEN>
Date: Wed, 25 Jan 2023 23:34:02 +0100
Message-ID: <CA+46MXakiruOtNK+x4teHeKgh0JgrrJXALQGC0VW=1TA=AtCsA@HIDDEN>
Subject: [PATCH] Add inlay hint support to eglot
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="0000000000004f94d105f31e3b0b"
Received-SPF: pass client-ip=209.85.222.171;
 envelope-from=dimitribelo@HIDDEN; helo=mail-qk1-f171.google.com
X-Spam_score_int: -15
X-Spam_score: -1.6
X-Spam_bar: -
X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9,
 FREEMAIL_FORGED_FROMDOMAIN=0.091, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--0000000000004f94d105f31e3b0b
Content-Type: multipart/alternative; boundary="0000000000004f94ce05f31e3b09"

--0000000000004f94ce05f31e3b09
Content-Type: text/plain; charset="UTF-8"

Hello,

I've been working on adding support for inlay hints inside eglot using
overlays.
Here is a working patch, but I'm still missing a few things:

- I can't figure out a way to show the hints on a document without causing
lags or timeouts from the lsp server
- I'm currently updating the hints by sending the whole file each time (to
make sure all hints get updated correctly). I'm not sure on how to make
this more efficient (or if it even necessary).

On the implementation side:
- implemented with overlays as a minor model, enabled by default
- shows all hints supported by the protocol
- there is a customisation to disable the minor mode if the user doesn't
want the feature

I'd love to get a few points to finish this patch, and of course any ideas
and feedbacks are welcome!

Kind regards,

Dimitri Belopopsky

--0000000000004f94ce05f31e3b09
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>Hello,<br><br></div>I&#39;ve been working o=
n adding support for inlay hints inside eglot using overlays.<br></div>Here=
 is a working patch, but I&#39;m still missing a few things:<br><br></div><=
div>- I can&#39;t figure out a way to show the hints on a document without =
causing lags or timeouts from the lsp server</div><div>- I&#39;m currently =
updating the hints by sending the whole file each time (to make sure all hi=
nts get updated correctly). I&#39;m not sure on how to make this more effic=
ient (or if it even necessary).<br><br></div><div>On the implementation sid=
e:</div><div>- implemented with overlays as a minor model, enabled by defau=
lt<br></div><div>- shows all hints supported by the protocol</div><div>- th=
ere is a customisation to disable the minor mode if the user doesn&#39;t wa=
nt the feature<br><br></div><div>I&#39;d love to get a few points to finish=
 this patch, and of course any ideas and feedbacks are welcome!<br><br></di=
v><div>Kind regards,<br><br></div><div>Dimitri Belopopsky<br></div></div>

--0000000000004f94ce05f31e3b09--

--0000000000004f94d105f31e3b0b
Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Add-inlay-hints-to-eglot.patch"
Content-Disposition: attachment; 
	filename="0001-Add-inlay-hints-to-eglot.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_ldc8nf7x0>
X-Attachment-Id: f_ldc8nf7x0

RnJvbSA4NDhmYTE2ZWI2MjU3Y2U0NTRjMTgxMGY4MWJlOGVkOGVkMTQwMTY0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBEaW1pdHJpIEJlbG9wb3Bza3kgPGRpbWl0cmlAYmVsb3BvcHNr
eS5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4iKSkKKyAgKG1hcGMgIydkZWxldGUtb3Zl
cmxheSAob3ZlcmxheXMtaW4gKHBvaW50LW1pbikgKHBvaW50LW1heCkpKQorICAobGV0ICgocmVh
ZC1vbmx5LXAgYnVmZmVyLXJlYWQtb25seSkKKwkgICAgICAgb3ZlcmxheXMpCisJICAgIChsZXQg
KChsZW5zLXRhYmxlIChtYWtlLWhhc2gtdGFibGUpKSkKKwkgICAgICA7OyBHZXQgdGhlIGlubGF5
IGhpbnQgb2JqZWN0cy4KKwkgICAgICAobWFwYyAobGFtYmRhIChpbmxheUhpbnQpCisJCSAgICAg
ICAgICAgICh3aGVuIChlZ2xvdC0tc2VydmVyLWNhcGFibGUKKwkJCSAgICAgICAgICAgICAgICAg
ICAgICAgOmlubGF5SGludFByb3ZpZGVyIDpyZXNvbHZlUHJvdmlkZXIpCisJCSAgICAgICAgICAg
ICAgKHNldHEgaW5sYXlIaW50CisJCQkgICAgICAgICAgICAgIChqc29ucnBjLXJlcXVlc3QgKGVn
bG90LS1jdXJyZW50LXNlcnZlci1vci1sb3NlKQorCQkJCQkgICAgICAgICAgICA6aW5sYXlIaW50
L3Jlc29sdmUgaW5sYXlIaW50KSkpCisJCSAgICAgICAgICAgIChsZXQgKChsaW5lICh0aHJlYWQt
Zmlyc3QgaW5sYXlIaW50CisJCQkJCSAgICAgICAgICAgICAgICAgICAgKHBsaXN0LWdldCA6cG9z
aXRpb24pCisJCQkJCSAgICAgICAgICAgICAgICAgICAgKHBsaXN0LWdldCA6bGluZSkpKSkKKwkJ
ICAgICAgICAgICAgICAocHV0aGFzaCBsaW5lCisJCQkgICAgICAgICAgICAgIChhcHBlbmQgKGdl
dGhhc2ggbGluZSBsZW5zLXRhYmxlKSAobGlzdCBpbmxheUhpbnQpKQorCQkJICAgICAgICAgICAg
ICBsZW5zLXRhYmxlKSkpCisJCSAgICAgIChqc29ucnBjLXJlcXVlc3QKKwkJICAgICAgICAoZWds
b3QtLWN1cnJlbnQtc2VydmVyLW9yLWxvc2UpCisJCSAgICAgICAgOnRleHREb2N1bWVudC9pbmxh
eUhpbnQKKyAgICAgICAgICAgIChsaXN0IDp0ZXh0RG9jdW1lbnQgKGVnbG90LS1UZXh0RG9jdW1l
bnRJZGVudGlmaWVyKSA6cmFuZ2UgKGxpc3QgOnN0YXJ0IChsaXN0IDpsaW5lIDAgOmNoYXJhY3Rl
ciAwKSA6ZW5kIChsaXN0IDpsaW5lIChjb3VudC1saW5lcyAocG9pbnQtbWluKSAocG9pbnQtbWF4
KSkgOmNoYXJhY3RlciAwKSkpCisJCSAgICAgICAgOmRlZmVycmVkIHQpKQorCisJICAgICAgOzsg
TWFrZSBvdmVybGF5cyBmb3IgdGhlbS4KKwkgICAgICAobWFwaGFzaAorCSAgICAgICAgKGxhbWJk
YSAobGluZSB2YWx1ZXMpCisgICAgICAgICAgICAoY2wtbG9vcCBmb3IgdmFsdWUgaW4gdmFsdWVz
CisgICAgICAgICAgICAgIGRvCisgICAgICAgICAgICAgIChjbC1sb29wIGZvciB2YWwgYmVpbmcg
dGhlIGVsZW1lbnRzIG9mCisgICAgICAgICAgICAgICAgKGlmIChzdHJpbmdwIChwbGlzdC1nZXQg
dmFsdWUgOmxhYmVsKSkKKyAgICAgICAgICAgICAgICAgIChsaXN0IChwbGlzdC1nZXQgdmFsdWUg
OmxhYmVsKSkKKyAgICAgICAgICAgICAgICAgIChwbGlzdC1nZXQgdmFsdWUgOmxhYmVsKSkKKyAg
ICAgICAgICAgICAgICBkbworCSAgICAgICAgICAgICAgKGVnbG90LS13aWRlbmluZworCSAgICAg
ICAgICAgICAgICAobGV0ICgoYyAocGxpc3QtZ2V0IChwbGlzdC1nZXQgdmFsdWUgOnBvc2l0aW9u
KSA6Y2hhcmFjdGVyKSkKKwkJICAgICAgICAgICAgICAgICAgICAgKHRleHQgKHByb3BlcnRpemUK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb25jYXQKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKGlmIChwbGlzdC1nZXQgdmFsdWUgOnBhZGRpbmdMZWZ0KSAi
ICIgIiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoc3RyaW5ncCB2
YWwpIHZhbCAocGxpc3QtZ2V0IHZhbCA6dmFsdWUpKQorICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAoaWYgKHBsaXN0LWdldCB2YWx1ZSA6cGFkZGluZ1JpZ2h0KSAiICIgIiIpKQor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21vdXNlLWZhY2UgJ2hpZ2hsaWdodCkpCisgICAg
ICAgICAgICAgICAgICAgICAgICAgKQorCSAgICAgICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQt
bWluKSkKKwkgICAgICAgICAgICAgIChmb3J3YXJkLWxpbmUgbGluZSkKKwkgICAgICAgICAgICAg
IChlZ2xvdC1tb3ZlLXRvLWNvbHVtbiBjKQorCSAgICAgICAgICAgICAgKGxldCAoKG92IChtYWtl
LW92ZXJsYXkgKHBvaW50KSAocG9pbnQpKSkpCisJCSAgICAgICAgICAgICAgKHB1c2ggb3Ygb3Zl
cmxheXMpCisJCSAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICdlZ2xvdC1pbmxheS1oaW50
IHZhbHVlcykKKwkJICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2JlZm9yZS1zdHJpbmcg
KHByb3BlcnRpemUgdGV4dCAnZmFjZSAnZWdsb3QtaW5sYXktaGludCkpCisgICAgICAgICAgICAg
ICAgICApKSkKKyAgICAgICAgICAgICAgICApKSkKKwkgICAgICAgIGxlbnMtdGFibGUpCisgICAg
ICAgICkKKyAgICApKQorCisKIAwKIDs7OyBIYWNrcwogOzs7Ci0tIAoyLjM0LjEKCg==
--0000000000004f94d105f31e3b0b--




Acknowledgement sent to Dimitri Belopopsky <dimitri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#61066; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 21 Feb 2023 15:30:01 UTC

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