Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add semantic syntax higlighting similar to pylance #237

Open
geetmankar opened this issue Sep 4, 2023 · 11 comments
Open

Add semantic syntax higlighting similar to pylance #237

geetmankar opened this issue Sep 4, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@geetmankar
Copy link

geetmankar commented Sep 4, 2023

Hi,

This is an enhancement proposal. Just wanted to know if it will be at all possible to color imported modules, classes (when they're used in type annotations), generics, and functions like VSCode PyLance does, or if it is out of the scope of this project.

Without PyLance:
image
image

With PyLance:
image
image

I feel like this can be very helpful to distinguish between what's being imported object is a class or a generic/type alias at a glance.

@MichaReiser MichaReiser added the question Further information is requested label Sep 5, 2023
@MichaReiser
Copy link
Member

MichaReiser commented Sep 5, 2023

Do you know if what you're referring to is Pylance's semantic highlighting feature?

@geetmankar
Copy link
Author

geetmankar commented Sep 5, 2023

Do you know if what you're referring to is Pylance's semantic highlighting feature?

That seems to be exactly what I was referring to.

@MichaReiser MichaReiser changed the title Coloring modules, classes, generics and functions like PyLance Add semantic syntax higlighting similar to pylance Sep 5, 2023
@MichaReiser MichaReiser added enhancement New feature or request question Further information is requested and removed question Further information is requested labels Sep 5, 2023
@MichaReiser MichaReiser removed the question Further information is requested label Apr 3, 2024
@ntluong95
Copy link

Is there any news about this feature?

@MithicSpirit
Copy link

probably blocking on red knot

@peacefulotter
Copy link

Pinging this to get some more attention - this is a needed feature for me!

@MithicSpirit

This comment has been minimized.

@ntluong95
Copy link

Red knot is still in progress. See Charlie's recent announcement.

Hi where I can see the announcement?

@MithicSpirit

This comment has been minimized.

@peacefulotter
Copy link

peacefulotter commented Jan 31, 2025

Red knot is still in progress. See Charlie's recent announcement.

What does that mean? I can see that #438 and #11664 (ruff repo) are closed..

@MithicSpirit
Copy link

What does that mean? I can see that #438 and #11664 (ruff repo) are closed..

I'm not sure why #438 is closed as completed when Micha said that it's planned. As for astral-sh/ruff#11664, that is only one of many things related to red knot. It's meant to be a full type checker for python, so it is, understandably, a very large undertaking. You can see related issues/PRs by searching for the "red-knot" label.

Note also that this repo is for the now less-used python server. It has been replaced by the native server that is built-in to ruff, which you should probably be using instead (see the documentation).

@peacefulotter
Copy link

Thank you for taking the time to explain all that. I'll keep an eye on red knot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants