Add new semantic token type for an identifier of keyword arguments #2682
Replies: 5 comments
-
Would really love if this was added, it's the one thing I miss from before I started using semantic highlighting |
Beta Was this translation helpful? Give feedback.
-
Would love this as well. Semantic highlighting is one of the few things that keeps me from dropping PyCharm (granted, PyLance has made it MUCH better in VSCode than it was previously in my opinion). If not this specific change, then maybe a convenient way of excluding specific scopes from PyLance's semantic highlighting through settings.json so any changes made via "editor.tokenColorCustomizations" will no longer be suppressed? I'm uncertain on how feasible this would be. |
Beta Was this translation helpful? Give feedback.
-
I'd also really appreciate this feature. To show an additional use case, having colored named parameters would make a huge difference for functions that pass values down a chain of responsibility and use the same parameter name for clarity. Additionally, named parameters in decorators currently don't have the semantic type of
As for the specific semantic name, I'd propose |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
Just found this issue after searching the internet for the reason for why |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request:
add new semantic token type for an identifier of keyword arguments when calling function.
I'd like to assign the new semantic token type to
variable.parameter.function-call.python
.Situation
I use semantic highlighting. Assigning a specific color to
parameters:python
allows us to distinguish between newly defined variables in a function and parameters given as function arguments. (before: first picture, after(using semantic highlighting) second picture)But, with this change, the identifier of the keyword argument when calling a function is also displayed in the same color.
Because the
variable.parameter.function-call.python
, which represents the identifier in the TextMate rule, was assigned a different color, it was previously displayed in a different color from the other parameters.(In the first picture,alpha, beta, gamma
are displayed in indigo on main method, but second picture, after using semantic highlighting, they are displayed in brown as parameters) This is because semantic highlighting takes precedence over syntax highlighting.Suggestion
I propose that assigning the new semantic token type to
variable.parameter.function-call.python
, such as selfParameter, or clsParameter.①


②
Beta Was this translation helpful? Give feedback.
All reactions