GNU bug report logs - #74914
30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Mon, 16 Dec 2024 15:20:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.90

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Troy Brown <brownts <at> troybrown.dev>, 74914 <at> debbugs.gnu.org
Cc: Felician Nemeth <felician.nemeth <at> gmail.com>, João Távora <joaotavora <at> gmail.com>
Subject: bug#74914: 30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp
Date: Sun, 29 Dec 2024 05:22:48 +0200
Hi!

On 16/12/2024 17:19, Troy Brown wrote:
> 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).

So, does this fix the problem for you?

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 816a1e67eca..51c19d5681a 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3416,7 +3416,7 @@ eglot--sig-info
                                        'font-lock-function-name-face))))
       ;; Now to the parameters
       (cl-loop
-       with active-param = (or sig-active activeParameter)
+       with active-param = (or activeParameter sig-active)
        for i from 0 for parameter across parameters do
        (eglot--dbind ((ParameterInformation)
                       ((:label parlabel))





This bug report was last modified 132 days ago.

Previous Next


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