Skip to content

Semantic highlighting does not work for variable defined in with #1328

@yangdanny97

Description

@yangdanny97

Describe the Bug

with open("foo.txt") as f:  # f has no semantic highlighting
    pass

x = 1  # x is colored like a variable

This does not repro in the sandbox because the sandbox has no semantic highlighting

From @grievejia

i suspect this is the same as the other semantic token issues where we really need to do an AST walk instead of relying on locations in keys (but pls double check if someone pick this up)

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions