Dedicated semantic token for method declaration with property decorator #2640
dmrowiec-pl
started this conversation in
Enhancement
Replies: 2 comments
-
This seems somewhat related, but perhaps deserves its own issue if not: class constants seem to be marked as One exception is enum members, which seem to have the special token type |
Beta Was this translation helpful? Give feedback.
0 replies
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when method inside class is decorated with
@property
, it's semantic token type is set as 'property', and modifier as 'declaration'. That is consistent with the actual state, however since in code it's written as a method, there is no possibility to override the color assigned to this particular scenario (modifying color set for 'property declaration' would just override declaration of every single variable set on a class instance). As a result, you get output like on the image below:You can see that it looks kind of weird. Anyway, it would be nice to add another modifier to the chain, like: 'property'->'declaration'->'decorator', so that it could be modified and set by the end-user in settings. Referring to the image above, that would allow to set the color to yellow for 'test_property' in lines 11 and 15, in order to have more consistency.
Beta Was this translation helpful? Give feedback.
All reactions