After commit 2880aae, SignatureInformation.activeParameter
does not have omitempty tag and always marshal. The problem is that its never assigned to anything and always 0
, which overrides actual value in SignatureHelp.activeParameter
, as stated in spec.
Solution is have same value as in SignatureHelp.activeParameter
in SignatureInformation.activeParameter
. The fix is minimal—just a one-line change —and I've submitted a PR.
Comment From: gopherbot
Change https://go.dev/cl/683135 mentions this issue: gopls: fix SignatureHelp activeParameter not being passed
Comment From: jakebailey
Having the parameter count in the signature info itself is good, but IIRC that is an optional feature the client may not use, and so having it set at the top-level reponse is also recommended as a fallback. Perhaps this field should be something else to distinguish "not present" from zero?
Comment From: jakebailey
Eh, maybe it doesn't matter in practice since they'll be the same value (no overloads in Go), and therefore clients will always have the right answer.