Skip to content

Representation of function overloads in completions #44

@automaticp

Description

@automaticp

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:

image

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:

image

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:

image

But it also supports signatureHelp (something that's worth considering for glsl_analyzer) to scroll through overloads:

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions