From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61412: Inlay activation Date: Wed, 15 Feb 2023 19:01:37 +0000 Message-ID: References: <83sff6ajhk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004cc1a605f4c1b650" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4642"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 61412@debbugs.gnu.org To: Chinmay Dalal Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 20:02:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSN2m-00012M-CJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 20:02:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSN2d-0002A6-H8; Wed, 15 Feb 2023 14:02:07 -0500 Original-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 ) id 1pSN2Z-00026P-FN for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSN2Y-0000VR-N7 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSN2Y-0001ao-B8 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61412-submit@debbugs.gnu.org id=B61412.16764877176110 (code B ref 61412); Wed, 15 Feb 2023 19:02:02 +0000 Original-Received: (at 61412) by debbugs.gnu.org; 15 Feb 2023 19:01:57 +0000 Original-Received: from localhost ([127.0.0.1]:34031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSN2S-0001aU-KU for submit@debbugs.gnu.org; Wed, 15 Feb 2023 14:01:56 -0500 Original-Received: from mail-oa1-f48.google.com ([209.85.160.48]:35421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSN2P-0001aF-N5 for 61412@debbugs.gnu.org; Wed, 15 Feb 2023 14:01:55 -0500 Original-Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-169ba826189so24153921fac.2 for <61412@debbugs.gnu.org>; Wed, 15 Feb 2023 11:01:53 -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=W+NJ+tmsVnPxnPTepalVdUcz2T9GfE0k/yhGNBjxNlE=; b=k1W/KxyEa+nwCkHPWf/pNXw5vDtGoeocZtOUIxndCK9ZogO2XzNz5+0bPet/tSFVmL zI7+GwX9030mYUbgIjXTp/XPPzNKtA3i0hTCg91/XMDPnjVsANP5ype3RcdkclcVHr1b CDm8ZSf1tUXwALiXt++6m4QlUr87WuiH3ExmUKMTJe6zdmMYXTj03ZGCRscOEhsB+j9U RHxuwzN2YZ0h4/I2z7wMjLRXv0qNyUGNROT/xdmZr/GS9PNfvcDGAXxpKOGmsXGuv55i kWTbAPBbAg/4i/gM8yqIJxOhHKe0ClK5DbSHiuUIJnbTav6x+gO5QI5Zd27v/DvF6XzQ U//A== 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=W+NJ+tmsVnPxnPTepalVdUcz2T9GfE0k/yhGNBjxNlE=; b=6TwHddL7suBkKSU/xQs1BRlSjDiLZlseoezuoOJY0My6rAvCu3W/BZvWYMueFWb0Wc dkdCSWFGxOWU1+DbDNuT1/lqOpKuFORhiMFmQsO0zhUTH4f0Xm/5S60UgB1QgaHC2K+w bK5oQJiLrzHDUvIjTMjtJ9H4KN9SEG44UcjxCQ33ojeS19PSdaweN4UJGmNu0AarF7PV y9Wa9WK9e/xDwpTlDfGNuHWVn6fCUWV4TatyuRmkOHhq8rwGCmWUU3/9XQL3PtjizUD9 y0Yeukfx3V8LwBNsS3cZ/XVn47VpI5uu7679Fou/exEh+GJlRnT4juUjkw3EBkgRKZYu zjOA== X-Gm-Message-State: AO0yUKVI4GfsRmX5Mh4G4szy9xTCascpmht0hzn9C11Tl5CGxspwjZzI G5qo7vi6jq7CGH8rflAocI6C2hzWPq0VByRHsWk= X-Google-Smtp-Source: AK7set9o8hdwQUdgdqsZoceoNqYzDEsYuPbBjrvgoLCG15kKpkXKO8LFjZg9lYcLs4ggCrRyjmmfyMTVWYdz36tahqY= X-Received: by 2002:a05:6870:4608:b0:163:cd38:813e with SMTP id z8-20020a056870460800b00163cd38813emr300294oao.215.1676487707901; Wed, 15 Feb 2023 11:01:47 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255765 Archived-At: --0000000000004cc1a605f4c1b650 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 15, 2023 at 6:56 PM Chinmay Dalal wrote: > > Eli Zaretskii writes: > > >> Cc: joaotavora@gmail.com > >> From: Chinmay Dalal > >> 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=C3=A3o --0000000000004cc1a605f4c1b650 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 15, 2023 at 6:56 PM Chinmay D= alal <dalal.chinmay.0101= @gmail.com> wrote:

Eli Zaretskii <eliz@gn= u.org> writes:

>> Cc: joao= tavora@gmail.com
>> From: Chinmay Dalal <dalal.chinmay.0101@gmail.com>
>> Date: Wed, 15 Feb 2023 21:54:57 +0530
>>
>> Regarding keybinding, on the github discussion someone suggested t= hat
>> vscode shows them while a key combination is held and hides them w= hen
>> 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.=C2=A0 If we wan= t to
> show hints, we either show tooltips, or display a message in the echo<= br> > 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 goi= ng to state the same thing. Hopefully your
= screenshots illustrate why ElDoc, at least using its=C2=A0
its display methods available at the moment, is not
<= div class=3D"gmail_quote">the best fit for this.

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

But the= activation and other details have to be carefully=C2=A0
consider= ed.=C2=A0 I will try to look into this soon.

Do you have a FSF copyright assignment, Chinmay?

= Jo=C3=A3o
--0000000000004cc1a605f4c1b650--