-
Notifications
You must be signed in to change notification settings - Fork 251
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
fix: Python highlighting issues #236
base: master
Are you sure you want to change the base?
Conversation
@SmitAkbari26 Have you installed and enabled Pylance? |
@Eitheages I install it and with semantic and with your changes Previously it was look like this after i remove mine merged pr with semantic And this without semantic This is after mine pr is merged without semantic sorry for i not set self scope And this is with semantic This is i make some little bit change in mine previous changes with semantic And without semantic Why you need to make that much changes to do same things? |
@SmitAkbari26 I've emailed you a comment because I think it's better to communicate more with you :) |
Ye i installed pylance
…On Fri, 25 Aug 2023 at 11:12, Bojun Ren ***@***.***> wrote:
@SmitAkbari26 <https://github.com/SmitAkbari26> I've emailed you a
comment because I think it's better to communicate more with you :)
—
Reply to this email directly, view it on GitHub
<#236 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A54QOVKEKA7UNN474AAYWATXXA3MJANCNFSM6AAAAAA3ZN4JNE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Add entries to "semanticTokenColors", which are related to Python. Support Python function declaration.
9f2e06d
to
597f2dd
Compare
Chiming in: I would like to see this merged (to have |
TL;DR: Go to "Detailed Changes"
This PR reverts disapproved #223, improves Python semantic highlighting features, with #232 finished. #223 happened to remove the highlight of
self
keyword, which is mentioned in #233.The syntax highlighting and semantic highlighting work together to provide the developers with more recognizable tokens. Semantic highlighting is more powerful, and generally more precise. It's highly recommended to turn on semantic highlighting features in VS Code.
No semantic:
With semantic:
In addition, since semantic highlighting overrides common syntax highlighting, it also offers the abilities to customize the token color with much flexibility. See this example.
Therefore, this PR expands the semantic highlighting feature on Python language. I've made the changes for one more months, and I didn't detect any side effects (like accidentally changing other language's highlighting color).
Detailed Changes
Fix the
self
keyword problem. This is done by reverting Customize the color of specific object types in python #218 #223 and add rules into"semanticTokenColors"
.Add additional highlighting to Python function decorators.
PS:
With semantic:
Without semantic:
Thanks for your checking! @wesbos @palashmon