Skip to content

Prioritize keyword arguments in call completions #2271

@joecox

Description

@joecox

Summary

Apologies if this is a duplicate, I couldn't quite tell if this has been included in existing server-labeled issues.

When triggering completions in the scope of method calls, class instantiations, etc, I would expect the argument names to appear first, especially if they are keyword arguments. In reality, Python keywords are ordered first, followed by True/None/False, in-scope symbols, and then the argument names.

Image

Playground link:
https://play.ty.dev/47b0593f-48a0-4c69-85aa-b85d716ab9f7

For comparison, pylance prioritizes the arguments:

Image

And maybe even better, pyrefly shows only the arguments:

Image

Version

ty 0.0.8 (aa7559d 2025-12-29)

Metadata

Metadata

Assignees

No one assigned

    Labels

    completionsBugs or features relating to autocomplete suggestionsserverRelated to the LSP server

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions