astral-sh / ruff-lsp

A Language Server Protocol implementation for Ruff.
Other
1.23k stars 45 forks source link

Add semantic syntax higlighting similar to pylance #237

Open geetmankar opened 11 months ago

geetmankar commented 11 months ago

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 commented 11 months ago

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

geetmankar commented 11 months ago

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

That seems to be exactly what I was referring to.