davidhalter / jedi

Awesome autocompletion, static analysis and refactoring library for python
http://jedi.readthedocs.io
Other
5.73k stars 503 forks source link

[Feature request] Support for syntax coloring (based on symbol type) #1997

Open ItsCubeTime opened 1 month ago

ItsCubeTime commented 1 month ago

Hi, I usually use PyLance with VS Code, however recently I started working with a rather large dependenecy (https://pypi.org/project/vulkan/) which seems to slow down PyLance to a point where it becomes virtually unusable (the language server even seem to crash? It just stops working randomly).

I noticed that Jedi handles this module a lot better, but now Im gravely missing the blue/green/yellow syntax coloring I usually get with PyLance: image This is the same file, with Jedi via Microsofts Python extension: image

Is there any chance that we could get support for similar syntax coloring?

Functions (and methods) would get a color of there own (yellow), variables & properties get a color of there own (blue), classes & modules would share the color green. Symbols with unknown type (eg. function parameters that doesnt have any type hinting) would become blue.

Thanks for reading :)

davidhalter commented 1 month ago

@ItsCubeTime This is something that is not very likely to make it to Jedi, unfortunately. The reason for this is mostly performance.

I am however writing a Jedi/Mypy replacement in Rust. The type checking part (mypy) is already very advanced. I'm keeping this issue open to not forget to implement this eventually. I feel like performance shouldn't be a problem at all in this case for what I'm working on.