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#73452: Code lens support in eglot Date: Thu, 26 Sep 2024 18:12:25 +0100 Message-ID: References: <05f4d679-d2cd-409c-aafd-bfac2eda7a21@fbengineering.ch> <86v7ylcatg.fsf@gnu.org> <86ikukc6lz.fsf@gnu.org> <402b37ee-8f2a-4c44-8861-be9054ed5255@fbengineering.ch> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000761dfd062308d290" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3938"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73452@debbugs.gnu.org, Eli Zaretskii To: Federico Beffa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 26 19:13:00 2024 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 1sts32-0000sw-KA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Sep 2024 19:13:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sts2h-0001Nl-2G; Thu, 26 Sep 2024 13:12:39 -0400 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 1sts2e-0001NT-Dy for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 13:12:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sts2d-0004hk-ED for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 13:12:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=8WD7hpWc2I+9TePq4Na+sepc+s5AfTdat6b9byqjoZ8=; b=S2WxV/qZjHRYhS8nfik0ZeL1hDMzYQBbQjOMU+Gg49B6YGjx1z6UJRcV00yy360M/8KS3Q54FvR3CfJU0BG5z2A8RqqLhoeOxoHrBdAD2ddHbDdqfRiRsgLOGPm9FW5QUbDCkGLZgYGOMO5fBPkuKl7QtftHGquV10MwWQEyVyDJU39M64nMC1d+lsVBj9jFw1rFt/ZEWeE0IHIw/nkKipUxYkr1zumJcnUMsNlPmaDIuCg2F80oMbYB+SpUOYno1l4tCmxcf7SEBPhbA0LMzkgQNLSbHpPX16tvQNaJtFQcdltFkIIT3MTLDlG+k3+czNjusPDAQqkeIXTDZPfUMQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sts33-0007HM-PM for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 13:13:01 -0400 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: Thu, 26 Sep 2024 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73452 X-GNU-PR-Package: emacs Original-Received: via spool by 73452-submit@debbugs.gnu.org id=B73452.172737075527913 (code B ref 73452); Thu, 26 Sep 2024 17:13:01 +0000 Original-Received: (at 73452) by debbugs.gnu.org; 26 Sep 2024 17:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sts2c-0007G6-7v for submit@debbugs.gnu.org; Thu, 26 Sep 2024 13:12:35 -0400 Original-Received: from mail-ot1-f52.google.com ([209.85.210.52]:54633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sts2Z-0007Fj-3H for 73452@debbugs.gnu.org; Thu, 26 Sep 2024 13:12:32 -0400 Original-Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-7092dd03223so313677a34.1 for <73452@debbugs.gnu.org>; Thu, 26 Sep 2024 10:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727370658; x=1727975458; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8WD7hpWc2I+9TePq4Na+sepc+s5AfTdat6b9byqjoZ8=; b=HZW9Utw7QSSt2v2HsGK9wZKREUWi2SP/Jy5ccpUd1MHr/mxOSuA5ox2Zyn6SgGk9pf AuEG27Wl+eVzS+9Mdar2WSugkVhPP8U3ZSO8cBCGgmmI5rtMXXqHDDGTB2m5h7jNI4Nn EXX2AiYCu3QVTQMGXctoQsYX2RDNWqPr4JWGeYQT2Z3Lzix1+oFIK+WF/E18KA6hJiuH 1RocwTNYRsLFDpwQ7FjVwMUs822tXO/hyC6pDeGf5X45XFfDRNRfUn4Q/z5Staq7VoBA T/V9COOS7bAwMB+NzxMx8A8uz43TaORAAqbqkpE1EsljHX6F+FxP/R9to9RnS+p2eXe6 5Ufg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727370658; x=1727975458; 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=8WD7hpWc2I+9TePq4Na+sepc+s5AfTdat6b9byqjoZ8=; b=FX6HH/6UGPmhcMBL3fBmrI68st9oYEJy3IyFfal08bfWmAmXI6yzx4d1Lt6Ka16uDj zyik/nO3WWxxEksEJLrarrQ6uC2/OeL/otU61xfbCnC6UBDPPKLQw69rSttnTITpL0B9 Rfu5povlcZUfSzIucBRlApEV7AWMwEUm2FT176ZNzb2QY0l0U4nwFLV/cnHmsEChc1vL u9cwN8PSmohleGa/2X2hoMl/eoA/FRaKaPNh55S+N2GVWvvUIt/IGHvQ3q1z8Y7XswUn vpXIGYXvRwKYiOYhJYkxMQBIMpcWA4KzL25g9vS3Q/b911yl3xy1tnE9zqxNPnzWCyv5 SrDQ== X-Forwarded-Encrypted: i=1; AJvYcCV0cHa0cKSezKD5mFI9qZn9DnBXhlfpBime7JYyyixCHoKyy6GYDeORgGaUroSuoWc+9KZSfw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxn3llr4uQYUJf5nYNMjTlbMim0v97+NyFxlsx1ADkJaKNr3wJi ZnyflSVO1KbmVft5pY3ZimtZEeFuDK6ebN9Ayvc6Shqkn7V1lp2pUiwDRB8z4uuQ85HS8zssL9K IlajOHXMZY1+HWSiRAJZNncCo3m8= X-Google-Smtp-Source: AGHT+IG+lZyeFe7sxORZkP5R575GsCgH5WpIy4osLECNj5CzWcldNGkIhoxroeHbb8UxPGf9nXVqayDW9J97q+j37pA= X-Received: by 2002:a05:6830:2b0b:b0:708:b29e:e95 with SMTP id 46e09a7af769-714fbee0335mr198840a34.20.1727370657927; Thu, 26 Sep 2024 10:10:57 -0700 (PDT) In-Reply-To: <402b37ee-8f2a-4c44-8861-be9054ed5255@fbengineering.ch> 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:292477 Archived-At: --000000000000761dfd062308d290 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 26, 2024 at 4:35=E2=80=AFPM Federico Beffa < federico.beffa@fbengineering.ch> wrote: > You may not like the VSCode UI, but Emacs doesn't have to use exactly the same interface. The client decides how to present the code lens text, and you may choose to only display it in some circumstances. Like Eli said: design and _fully_ specify a model of user interaction with this feature and present it. Doesn't have to be a funcional prototype, a mockup of some sort will do, as long as it is specified enough for future implementers to understand edge cases. I.e. it's not enough to say "I want this thingy here like VSCode". Think what happens if text is inserted before, inside or after, the locus of the "code lens" annotation (if any). What happens if the text is deleted. What conditions, if any, lead to invalidation of the lens's information and what happens on said information. Anticipate the all-too-frequent "this thing flickers and its annoying" complaint and how to possibly deal with it. How it should work (if at all) in non-GUI Emacs. All of that is work that needs to be done, you don't need to be an Emacs/Eglot wiz. I personally don't see enough motivation to do it. I had for inlay hints, and I had to answer all those questions before implementing it. > Code lenses are part of the core features of LSP since several years and are used by many servers. If Emacs ignores them, all those features are not available in Emacs. >From what I was able to gather from other's reports , these features are already available to users in one form or another. Indeed, the examples you show here could all be done with code actions. Jo=C3=A3o --000000000000761dfd062308d290 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Sep 26, 2024 at 4:35=E2=80=AFPM Federico Beffa <= ;federico.beffa@fbengine= ering.ch> wrote:

> You may not like the VSCode UI, but Ema= cs doesn't have to use exactly the same interface. The client decides h= ow to present the code lens text, and you may choose to only display it in = some circumstances.

Like Eli said: design and _fully_ specify a= model of user interaction with this feature and present it.=C2=A0
Doesn't have to be a funcional prototype, a mockup of some sort will = do, as long as it is specified enough for future implementers to understand= edge cases.=C2=A0=C2=A0

I.e. it's not enough = to say "I want this thingy here like VSCode". Think
wha= t happens if text=C2=A0 is inserted before, inside or after, the locus of = the=C2=A0
"code lens" annotation (if any).=C2=A0 What h= appens if the text is deleted. What=C2=A0
conditions, if any, lea= d to invalidation of the lens's information and what happens
= on said information.=C2=A0 Anticipate the all-too-frequent "this thing= flickers and its=C2=A0
annoying" complaint and how to possi= bly deal with it. How it should work (if=C2=A0
at all) in non-GUI= Emacs.=C2=A0 All of that is work that needs to be done, you don't=C2= =A0
need to be an Emacs/Eglot wiz.=C2=A0 I personally don't s= ee enough motivation to=C2=A0
do it.=C2=A0 I had for inlay hints,= and I had to answer all those questions before=C2=A0
implementin= g it.
=C2=A0
> Code lenses are part of the core features of = LSP since several years and are used by many servers. If Emacs ignores them= , all those features are not available in Emacs.

From what I wa= s able to gather from other's reports , these features are already avai= lable=C2=A0
to users in one form or another.=C2=A0 Indeed, the ex= amples you show here could all be done=C2=A0
with code actions.

Jo=C3=A3o
--000000000000761dfd062308d290--