Skip to content

ZLS should not assume how the completed code will be used #3204

@Verafahn

Description

@Verafahn

When I use a function via code completion, ZLS completes the parameter list as well. However, when I intend to pass the function itself to another function (rather than calling it), it still completes the parameter list.

Image Image Image Image

Additionally, completion for struct literals adds an extra ; compared to other containers. This causes inconvenience when passing an anonymous type as a function argument. I consider this a bug, as other containers do not exhibit this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions