unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Troy Brown <brownts@troybrown.dev>,
	Felician Nemeth <felician.nemeth@gmail.com>,
	74914@debbugs.gnu.org
Subject: bug#74914: 30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp
Date: Sat, 28 Dec 2024 13:28:12 +0000	[thread overview]
Message-ID: <CALDnm52X9KcV0A3cDGdc=xuKUGaXBxZ0qHW_+cF6A0QdCWBaYg@mail.gmail.com> (raw)
In-Reply-To: <868qs0t528.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2904 bytes --]

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ão

On Sat, Dec 28, 2024, 11:33 Eli Zaretskii <eliz@gnu.org> wrote:

> > Cc: Felician Nemeth <felician.nemeth@gmail.com>,
> >  João Távora <joaotavora@gmail.com>
> > 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 `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/glib.adb"},"position":{"line":102,"character":38}}}
> > [jsonrpc] e[09:50:52.444] <-- textDocument/publishDiagnostics
> >
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/gtkada_24.0.0_80c56171/src/glib.adb","diagnostics":[{"range":{"start":{"line":102,"character":38},"end":{"line":102,"character":39}},"source":"libadalang","message":"Missing
> >
> ';'"},{"range":{"start":{"line":102,"character":38},"end":{"line":102,"character":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 = (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ão, any comments or suggestions?
>

[-- Attachment #2: Type: text/html, Size: 4565 bytes --]

  reply	other threads:[~2024-12-28 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 15:19 bug#74914: 30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp Troy Brown
     [not found] ` <handler.74914.B.173436237328655.ack@debbugs.gnu.org>
2024-12-23 15:54   ` bug#74914: Acknowledgement (30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp) Troy Brown
2024-12-28 11:33 ` bug#74914: 30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp Eli Zaretskii
2024-12-28 13:28   ` João Távora [this message]
2024-12-29  3:22 ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm52X9KcV0A3cDGdc=xuKUGaXBxZ0qHW_+cF6A0QdCWBaYg@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=74914@debbugs.gnu.org \
    --cc=brownts@troybrown.dev \
    --cc=eliz@gnu.org \
    --cc=felician.nemeth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).