Skip to content

Type-aware autocompletion #2081

Open
Open
@viluon

Description

@viluon

Hi, I'm surprised that I couldn't find a similar issue, except for #817. Please excuse me if it is misplaced.

I wish HLS provided type-aware autocompletion. The autocompletion it does have often isn't very useful:
image

In this case, the obvious type-correct autocompletion would be ssDynTrace, of type [DynTraceEntry]. Instead, the autocompletion is full of relevant but quite useless definitions. In fact, ssDynTrace isn't even listed until I type a d.
image

Another issue is that with record wildcards, there are duplicate completions available. Here, ssDynTrace is listed once as the value from the wildcard and once more as the getter function.
image

In theory, I could use a hole instead, but invoking Wingman with many bindings in scope isn't a good idea:
image

Even if VS Code made the quick action list searchable, the "attempt to fill hole" and "refine hole" commands time out. Plus, Wingman doesn't seem like the right tool for the job – I know pretty well what I want to write, I just don't want to have to spell every identifier out, and the types involved don't uniquely identify the correct solution.

It'd be nice if HLS could trim the autocompletion suggestions by type and offer relevant suggestions even with no prior identifier input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions