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#74914: 30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp Date: Sat, 28 Dec 2024 13:28:12 +0000 Message-ID: References: <868qs0t528.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bc8d45062a548d8c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23670"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Troy Brown , Felician Nemeth , 74914@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 28 14:30:19 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 1tRWtX-0005zY-Bf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Dec 2024 14:30:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRWtL-00055P-Ml; Sat, 28 Dec 2024 08:30: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 1tRWtH-00051C-Jt for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 08:30:03 -0500 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 1tRWtH-00005y-97 for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 08:30:03 -0500 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=4ybqEniqV9LVKpd3Qqd3wZ0Io6bmwae+frdRRDzbyZg=; b=kLnqv7Dd7IIWr9WasOk2Hcs2hZm4LwOJMFTA3sLcE51ygLTvO2ApyolVODYe6e/pmql3THI5cHbueQcMYnMQDrKblchH/GXPHXWABrke1701XGnNS41pEpIg0vSrav/ps7xvGGezuLthPz+1f1xDeFj64yh2kPV90znTH0T0TEKqsl2b9sBF0K5pteFbhCcJNHCUXs+ZocnzA+svyasYu/gE2Ut0AVBJlNnI9LZDSt1Xz6+NYNr+ROXglJg1oLvv7Bt5Z642n0AxXBfc63OWXfYtWq6qZme5V/zyInjHpPOj00pyz6f8RH90tvz/VY+dQSQ+dgnrfP8rfyTzY5G0pA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRWtG-00051q-6o for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2024 08:30: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: Sat, 28 Dec 2024 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74914 X-GNU-PR-Package: emacs Original-Received: via spool by 74914-submit@debbugs.gnu.org id=B74914.173539257219267 (code B ref 74914); Sat, 28 Dec 2024 13:30:02 +0000 Original-Received: (at 74914) by debbugs.gnu.org; 28 Dec 2024 13:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:49779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRWsl-00050g-RC for submit@debbugs.gnu.org; Sat, 28 Dec 2024 08:29:32 -0500 Original-Received: from mail-oa1-f54.google.com ([209.85.160.54]:53337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRWsj-00050R-Im for 74914@debbugs.gnu.org; Sat, 28 Dec 2024 08:29:30 -0500 Original-Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-29e91e58584so4881644fac.2 for <74914@debbugs.gnu.org>; Sat, 28 Dec 2024 05:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735392504; x=1735997304; 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=4ybqEniqV9LVKpd3Qqd3wZ0Io6bmwae+frdRRDzbyZg=; b=c9Q4TO7vsVew0Re4T5ct2Yb9/AUN/iV7dbGK3ubrsMBc0xdilNju/3SjlFUWev9l12 nl0hMFwkVFkgsK6p19syHBF4ivfxfC1H+RXvAdRcOORRgsRZAYJS7i+9EmZOh8ZUj566 CwC67DiQ8AOScGPVBZCWOkJvv+/pkCpj58ZVXz1LPWLQY0IBq64aPM5Frs/x32TVVyhF sk/fG4DWpobtoWJi8OLqNP0J5lx36OxRgaf+WZpG7w1FHAlhT7Q+DxnTlEECLaLaZNiW xo+wlGBXSGTNK9wPnQQo2lzLK39eZtytwM2D8/+yDnhrsO1hOSMqG93/nDc4xwOVJDtx NddQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735392504; x=1735997304; 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=4ybqEniqV9LVKpd3Qqd3wZ0Io6bmwae+frdRRDzbyZg=; b=q9KyzNOr7mjKzAAT2P1g2K39Kaa3HTr/d0MmYFnaz7IYqep7lOB2zEJcbYsbyFhHr6 UA6YSpZjSjiae4lutTbeHrx0UL38aUGQ1j5PidMia8GtezN12aqWxk+LkBgaXsfU0KtH iMhdr3IdB4vZSxZK+2g27B+U4NAxzq6+sLMU3ld64F0InY3DmoFzK7UmNNpdr+3TD3zb /9q23UCj0mfBCj1pWfQKmLH7oOH/5+X3glKs3H9GFBlEYiLYANlkZ4gWjmPhqcHyu+IS S5f4pQxm72hMHUqmjfIhw0V2upE/dvtEnbsJlCtGq2U2Iz0t6qHm62VkeneLry6QYGOL 6GXQ== X-Forwarded-Encrypted: i=1; AJvYcCUSKbPnrAlD7Iz4U++lLPAwj7cQkRb4sJA1bL4cAtOeCVPvE5uj2lpb90ktJ6ogYZBxnjsZNw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwxIqvMtPlBklwmdeuFX+Dmp/0PiMsHey2hrTqHOLPEGFbNp040 ASPoQFy5isylAdjJ4enCLe3UdxHc4CjcofwMTAMzNqEso9PWkmYcGxs9GPrqPWrilzBNPqiHWFp RcuBEypvdmAS+2mxfnLOl7zXmvr8= X-Gm-Gg: ASbGncscrPuYFPxaaP0Qoi9UwrM7T1IMw9T7RvHLpp2zE31Qbj9/ge0W3EyCKK9dfYP n4bPfXtDvJOpJa6s3JAr1r+bIUgxVu4essFF+ X-Google-Smtp-Source: AGHT+IFCG4Hq6PVClp25R/zATpxA6v2okc01rfmwaRDJ5qUWwHw4spsT28FIzhcT4jGqk2irVHflU4N3KV3XRSczlWo= X-Received: by 2002:a05:6870:2153:b0:29e:65ed:5c70 with SMTP id 586e51a60fabf-2a7fb30519emr17025716fac.30.1735392503825; Sat, 28 Dec 2024 05:28:23 -0800 (PST) In-Reply-To: <868qs0t528.fsf@gnu.org> 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:297902 Archived-At: --000000000000bc8d45062a548d8c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This looks like it's good, but i'd have to double check in 2025 (away from my machine until then) unless Felician is confident and signs off on it. Jo=C3=A3o On Sat, Dec 28, 2024, 11:33 Eli Zaretskii wrote: > > Cc: Felician Nemeth , > > Jo=C3=A3o T=C3=A1vora > > From: Troy Brown > > Date: Mon, 16 Dec 2024 10:19:14 -0500 > > > > I'm working with a language server that provides an `activeParameter` > > field both in SignatureHelp (set to 0) as well as in > > SignatureInformation (set to 1). Under this condition, for the > > signature output in the echo area, Eglot always displays the first > > parameter (i.e., index 0). According to the LSP specification, when > > an `activeParameter` field is specified in SignatureInformation "this > > is used in place of `SignatureHelp.activeParameter`". The following > > is a partial log covering this transaction: > > > > [jsonrpc] e[09:50:52.423] --> textDocument/signatureHelp[97] > > > {"jsonrpc":"2.0","id":97,"method":"textDocument/signatureHelp","params":{= "textDocument":{"uri":"file:///home/troy/junk/gtkada_24.0.0_80c56171/src/gl= ib.adb"},"position":{"line":102,"character":38}}} > > [jsonrpc] e[09:50:52.444] <-- textDocument/publishDiagnostics > > > {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"ur= i":"file:///home/troy/junk/gtkada_24.0.0_80c56171/src/glib.adb","diagnostic= s":[{"range":{"start":{"line":102,"character":38},"end":{"line":102,"charac= ter":39}},"source":"libadalang","message":"Missing > > > ';'"},{"range":{"start":{"line":102,"character":38},"end":{"line":102,"ch= aracter":39}},"source":"libadalang","message":"Skipped > > token > )"},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character= ":0}},"severity":4,"source":"ada.project","message":""}]}} > > [jsonrpc] e[09:50:52.445] <-- textDocument/hover[95] > > {"jsonrpc":"2.0","id":95,"result":null} > > [jsonrpc] e[09:50:52.454] <-- textDocument/documentHighlight[96] > > {"jsonrpc":"2.0","id":96,"result":null} > > [jsonrpc] e[09:50:52.454] <-- textDocument/signatureHelp[97] > > {"jsonrpc":"2.0","id":97,"result":{"signatures":[{"label":"function > > Internal (Name : String; Thing : String) return > > > GType","documentation":"","parameters":[{"label":"Name"},{"label":"Thing"= }],"activeParameter":1}],"activeSignature":0,"activeParameter":0}} > > > > I believe the reason for Eglot's behavior is due to the way > > "active-param" is specified in the cl-loop within `eglot--sig-info`. > > ```text > > with active-param =3D (or sig-active activeParameter) > > ``` > > The value of activeParameter in SignatureInformation (activeParameter) > > should be given higher priority (i.e., listed first) over the > > activeParameter specified in SignatureHelp (sig-active). > > Jo=C3=A3o, any comments or suggestions? > --000000000000bc8d45062a548d8c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This looks like it's good, but i'd have to double= check in 2025 (away from my machine until then) unless Felician is confide= nt and signs off on it.=C2=A0=C2=A0

Jo=C3=A3o=C2=A0

On Sat, Dec 28, 2024, 11:33 Eli Zaretskii <eliz@gnu= .org> wrote:
> Cc: Felician Nemeth <felician.nemeth@gmail.co= m>,
>=C2=A0 Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com&= gt;
> From: Troy Brown <brownts@troybrown.dev>
> Date: Mon, 16 Dec 2024 10:19:14 -0500
>
> I'm working with a language server that provides an `activeParamet= er`
> field both in SignatureHelp (set to 0) as well as in
> SignatureInformation (set to 1).=C2=A0 Under this condition, for the > signature output in the echo area, Eglot always displays the first
> parameter (i.e., index 0).=C2=A0 According to the LSP specification, w= hen
> an `activeParameter` field is specified in SignatureInformation "= this
> is used in place of `SignatureHelp.activeParameter`".=C2=A0 The f= ollowing
> is a partial log covering this transaction:
>
> [jsonrpc] e[09:50:52.423] --> textDocument/signatureHelp[97]
> {"jsonrpc":"2.0","id":97,"method&qu= ot;:"textDocument/signatureHelp","params":{"textDo= cument":{"uri":"file:///home/troy/junk/gtkada_24.0.0_80= c56171/src/glib.adb"},"position":{"line":102,"= ;character":38}}}
> [jsonrpc] e[09:50:52.444] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocu= ment/publishDiagnostics","params":{"uri":"fil= e:///home/troy/junk/gtkada_24.0.0_80c56171/src/glib.adb","diagnos= tics":[{"range":{"start":{"line":102,&qu= ot;character":38},"end":{"line":102,"characte= r":39}},"source":"libadalang","message":= "Missing
> ';'"},{"range":{"start":{"line&q= uot;:102,"character":38},"end":{"line":102,&q= uot;character":39}},"source":"libadalang","me= ssage":"Skipped
> token )"},{"range":{"start":{"line"= :0,"character":0},"end":{"line":0,"chara= cter":0}},"severity":4,"source":"ada.project&= quot;,"message":""}]}}
> [jsonrpc] e[09:50:52.445] <-- textDocument/hover[95]
> {"jsonrpc":"2.0","id":95,"result&qu= ot;:null}
> [jsonrpc] e[09:50:52.454] <-- textDocument/documentHighlight[96] > {"jsonrpc":"2.0","id":96,"result&qu= ot;:null}
> [jsonrpc] e[09:50:52.454] <-- textDocument/signatureHelp[97]
> {"jsonrpc":"2.0","id":97,"result&qu= ot;:{"signatures":[{"label":"function
> Internal (Name : String; Thing : String) return
> GType","documentation":"","parameters&qu= ot;:[{"label":"Name"},{"label":"Thing&qu= ot;}],"activeParameter":1}],"activeSignature":0,"a= ctiveParameter":0}}
>
> I believe the reason for Eglot's behavior is due to the way
> "active-param" is specified in the cl-loop within `eglot--si= g-info`.
> ```text
> with active-param =3D (or sig-active activeParameter)
> ```
> The value of activeParameter in SignatureInformation (activeParameter)=
> should be given higher priority (i.e., listed first) over the
> activeParameter specified in SignatureHelp (sig-active).

Jo=C3=A3o, any comments or suggestions?
--000000000000bc8d45062a548d8c--