You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could do a pull request for that....BUT I want something even better, something that Atom via it's Treesitter does, and that would be to highlight component Tags as TSType as seen in this image:
Notice the Yellow for Row (Yellow being the Type color for Atom's default theme).
HTML tags such as div are highlighted differently.
This is useful since in my Neovim setup I can just type gf on the Row and go to the definition.
In JSX tag names that start with an uppercase letter mean Component instance.
Is that possible to do in highlights.scm file? Query the first letter of jsx_opening_element or jsx_self_closing_element name? What is the syntax?
If possible we should do that.
Best regards.
The text was updated successfully, but these errors were encountered:
Just tested master with merged #500. Fantastic, this enhancement works really well, especially inside React-based JavaScript files.
This genuinely feels like a quantum leap in terms of syntax highlight quality and smarts. Old Vim style regex is like a 1950s VW Beetle and Treesitter is like a modern Porsche. A game-changer for sure imo.
Many thanks again @kyazdani42 for the PR and the wider Treesitter team.
Hello Treesitter folks,
In issue #465 it was agreed upon to add new
@tag
and@tag.delimiter
directives for HTML (and similar markup languages).JSX is just such a case.
Currently, the
highlights.scm
for JSX is:It could be improved as follows:
I could do a pull request for that....BUT I want something even better, something that Atom via it's Treesitter does, and that would be to highlight component Tags as
TSType
as seen in this image:Notice the Yellow for
Row
(Yellow being the Type color for Atom's default theme).HTML tags such as
div
are highlighted differently.This is useful since in my Neovim setup I can just type
gf
on theRow
and go to the definition.In JSX tag names that start with an uppercase letter mean
Component
instance.Is that possible to do in
highlights.scm
file? Query the first letter ofjsx_opening_element
orjsx_self_closing_element
name? What is the syntax?If possible we should do that.
Best regards.
The text was updated successfully, but these errors were encountered: