Skip to content

Conversation

@hisbvdis
Copy link

tsx: Highlight React component tags

Release Notes:

  • N/A

@cla-bot
Copy link

cla-bot bot commented Aug 29, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @hisbvdis on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@hisbvdis
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Aug 29, 2025
@cla-bot
Copy link

cla-bot bot commented Aug 29, 2025

The cla-bot has been summoned, and re-checked this pull request!

@maxdeviant maxdeviant changed the title languages: Add React component tags highlights to the JSX languages: Add React component tags highlights for TSX Sep 2, 2025
@maxdeviant maxdeviant changed the title languages: Add React component tags highlights for TSX languages: Add React component tag highlights for TSX Sep 2, 2025
@probably-neb
Copy link
Collaborator

; JSX elements
(jsx_opening_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))
(jsx_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))
(jsx_self_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))

I don't see how your addition isn't already covered by this query just a few lines above the addition? Besides using @tag.component.jsx instead of @tag.jsx

@hisbvdis
Copy link
Author

hisbvdis commented Sep 17, 2025

; JSX elements
(jsx_opening_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))
(jsx_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))
(jsx_self_closing_element (identifier) @tag.jsx (#match? @tag.jsx "^[a-z][^.]*$"))

I don't see how your addition isn't already covered by this query just a few lines above the addition? Besides using @tag.component.jsx instead of @tag.jsx

It considers tags, that start with uppercase as Components

Addition's regex has uppercase letters

@hisbvdis hisbvdis deleted the add-highlights-for-react-component-tags-tsx branch September 18, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants