pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Pylance parity - color coding recognized imports

Open rosmur opened this issue 7 months ago • 1 comments

Describe the Bug

Pylance (within VS Code) currently turns packages it recognizes to green text in the import statement. It serves as a visual tell that the package has been successfully found:

With pylance: Image

Pyrefly does not do this (the text remains black): Image

Pyrefly does put the red squiggly line underneath the text for unrecognized packages and raises a problem. However, it is friction/behavior change from pylance - I hope parity can be established as I'd imagine pylance will be the most common place folk are migrating from.

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

rosmur avatar May 19 '25 01:05 rosmur

I think this is another case that would be covered once we support semantic highlighting cc @kinto0

yangdanny97 avatar May 19 '25 01:05 yangdanny97

Hi @rosmur, @SamChou19815 added support for semantic highlighting in VSCode in Pyrefly's latest release. If you get a chance to try it, we'd love to know what you think.

lolpack avatar Jun 18 '25 15:06 lolpack

this semantic highlighting is working as of the newest version. feel free to reopen this issue if it's not working as expecetd

kinto0 avatar Jun 18 '25 17:06 kinto0