-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 TypeScript highlights #18525
Conversation
((identifier) @constructor | ||
(#match? @constructor "^[A-Z]")) | ||
|
||
((identifier) @type | ||
(#match? @type "^[A-Z]")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second query always overwrites the first, can anyone explain why it's written in this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also causes CamelCase variables to be highlighted as types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the constructor one. Thanks for catching that.
((identifier) @constructor | ||
(#match? @constructor "^[A-Z]")) | ||
|
||
((identifier) @type | ||
(#match? @type "^[A-Z]")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the constructor one. Thanks for catching that.
@Huliiiiii It looks like there are some merge conflicts that need to be resolved. Once those are resolved I think this will be in a state that we can merge. |
@type.builtin
Confused about case-based queries, should they be rewritten?
Release Notes: