GNU bug report logs -
#74914
30.0.90; Eglot: Incorrect parameter highlighted in signatureHelp
Previous Next
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
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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).
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.