-
Notifications
You must be signed in to change notification settings - Fork 765
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
Improve semantic highlighting of TypeAlias
#3100
Comments
TypeAlias
Similarly, consider behavior of |
Any updates on this? |
Sorry but this is not currently planned. However you can get this somewhat by yourself. The TypeAlias is flagged with a
Which for me, gives the same color for the typehint as the original type. |
Great, I'll try for it. Thanks! |
It works for type hints only, so I think pylance should still provide separate semantic tokes for type aliases (or mark them as types or classes at least). Anyway, the type hint trick is better than nothing, thanks for the suggestion. |
Really need this feature! |
I wonder if:
Pylance could use
TypeAlias
instead of the type alias name for the type hinting for type aliases. According to PEP 613, the type hinting for type aliases should be TypeAlias.Pylance could use the same color to display type hintings regardless of whether they are native or type aliases. When I use the theme Horizon Extended Theme, native type hintings are in yellow and type aliases in red (like variables).
Example:
I am using:
Version: 1.70.0-insider (system setup)
Commit: 13ba7bb446a638d37ebccb1a7d74e31c32bb9790
Date: 2022-07-22T05:17:00.353Z
OS: Windows_NT x64 10.0.19044
The text was updated successfully, but these errors were encountered: