glsl_analyzer
glsl_analyzer copied to clipboard
Representation of function overloads in completions
Hey, I wanted to clarify one thing about the behavior of completion on overloads. Currently (v1.3.2), there's a duplicate entry for each function overload:
I think this is mostly noise and impacts discoverability. Could we maybe consolidate this into a single entry, since the documentation for each overload is still available through hover?
For reference, this is how clangd does this:
Where it says [N overloads] and provides docs for one of them. Now, clangd has full type information, so it can select the right overload on hover:
But it also supports signatureHelp
(something that's worth considering for glsl_analyzer) to scroll through overloads:
For the current state of glsl_analyzer, I think it would help to remove duplicates in completions, but keep the documentation for each overload on hover, so that it's still accessible.
Once type information is available, we can also give the docs for the right overload on hover.
The signatureHelp
could be added without type info for discoverability already, but it won't be able to show the "right/current" overload.