-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added missing CSS highlight Tree Sitter Scopes #12497
base: master
Are you sure you want to change the base?
Conversation
use the same scopes as what Neovim is using for
Yeah, see #12207 |
Thank you! Yup, that is exactly what I I needed
Do you mean for everything or only for those three which I did not know where to put? For instance, placing In VSCode for instance, not only units are customizable, but you can even customize them separately - I copied
and for some reason nesting symbol |
Yeah well I mean the neovim queries can certainly serve as inspiration but they are missing out on some things. For the units, typically we are highlight constants with I'd say we should have a Especially when not only CSS has these but nushell too for example. The |
Oh and btw we have the same name :-) |
That is definitely a valid css syntax. I work with Vue.js and Ionic - and Ionic components heavily use this Shadow-DOM for CSS encapsulation. And you can only access the elements inside if they have a I guess I will just wait for the maintainers to reply - but my point is - regarding syntax highlighting VSCode was wayyy more customizable comapred to neovim (strangely enough). So I'd like helix to be on par, or even better. That is a bit off topic but |
TIL about that syntax Would be nice if Helix had more specific selectors for everything, such as Nikita is a male name in eastern Europe, which is where I'm from! |
I saw that some highlighting was missing in my CSS files.
I added the missing scopes (or nodes? idk how to call them) but I don't know what proper color for them would be, so please, advice me regarding the changes to make.
For now, for demonstration purposes, I added them as keywords.
Before:
After:
Also, right now we have these queries
Which incorrectly capture things inside
::part()
selector, inside of which can be any label (used to access elements inside Shadow-DOM). But as I understood it requires some changes to the C parser, and I have never written C or Parser/lexer so I cannot fix it... I will just notify whoever can fix itAnd one more question, is there any way to copy/dump the tree-sitter tree, similar to #12208? That would be great for analysis or bug fixes or learning.