Skip to content

LSP highlights wrong argument when using a call as argument #2500

@spaceship-zebra

Description

@spaceship-zebra

Describe the Bug

In the following code, typing foo('a', will highlight the current argument as b. However, typing foo(max('a', 'b'), will highlight the argument c. It seems like pyrefly simply counts the , instead of actual arguments.

Working example when using simple arguments:
Image

Highlighting the wrong argument c:
Image

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    language-serverIssues specific to our IDE integration rather than type checking

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions