Not an issue, but feature request. Currently, SignatureHelp returns a label that is not valid Go code, which makes it difficult to parse and highlight it for clients. Many language servers work-around this by prefixing output with function declaration keyword, even though it might be redundant in the context of SignatureHelp. Unfortunately, this seems to be the only way to give the client enough context to parse the signature correctly. So there's a tradeoff here.
I've tried this and here’s a screenshots of Neovim:
Interestingly, this already happens naturally for anonymous functions, since we use "func" as their name. So the change wouldn't affect those:
One more, perhaps not very important, point is that it makes SignatureHelp match Hover look, which makes it easier to align with expectations for how function information is displayed.
I'm asking for feedback on the proposal and would be happy to submit the change - I already have a POC version ready.
Comment From: gabyhelp
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)