Open ispringle opened 1 day ago
Hey! I'd love to have that as well (I use styled components in React a lot myself, and it would be great to have CSS syntax highlighting there), but I think that the last time I investigated it, my conclusion was that Emacs has no support whatsoever for injection queries. I might be wrong, or it might have changed, maybe I'll try again to make it work.
Some frameworks, like lit, use template strings to define HTML and CSS. For example:
Wondering what it would take to add support for that to this mode. Neovim is using treesitter to pull this off, they do it with the following query:
I've tested this in the treesitter playground and it highlights the correct portion of the above JS example. I'm not sure how to turn that query into its own set of nested highlighting though or else I'd make a PR