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'm testing out the new 1.0 release of the plugin and I am very impressed! It might be already on the radar, but I didn't see an issue for it; the JSX tags are currently not highlighted making the source code harder to read IMO. See attached code sample for the difference:
Reacted by Florian Hammerschmidt, Christoph Knittel, zetashift, Amirali Esmaeili, Joey Mezzacappa, Paweł Falisz, Tamim Arafat, Max T., David Calhoun, Barclay and 5 more
I found out that it is just that my theme didn't color the entity.name.namespace. Many themes do not, because I had this hypothesis that my theme wasn't displaying them and swapped a few themes and they also didn't. Dark+ does however. You can also add the value in the settings:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "JSX",
"scope": ["entity.name.namespace"],
"settings": {
"foreground": "#80CBC4"
}
},
// you might also want to set this for polymorphic variants
{
"name": "other",
"scope": ["punctuation.definition.keyword"],
"settings": {
"foreground": "#f87086"
}
}
]
}
Reacted by Julien Elbaz, Max T., Paweł Falisz, Christoph and Shourya Bansal
@jfrolich thanks for the solution, i also wanted to highlight in my theme jsx element and their attributes but I found out, that with actual grammar this it is not possible yet(?).
What i mean is, in .re file with ocaml-platform extension when i check it with Cmd + Shift + P and pick DM: Inspect editor tokens and scopes i get something like this when checking
but right now they are not assigned to any scope
Is it bug... or it is something that won't be implemented?
PS. I was thinking about it creating new issue, but this is also related to jsx so i thought it might good place to point that out because i think lot's of themes are decorating jsx in this manner
Activity
tkovs commentedon Nov 26, 2020
Here it is working for my own components
jfrolich commentedon Nov 26, 2020
Interesting! That is not working for me. What version of the extension are you using?
tkovs commentedon Nov 29, 2020
jfrolich commentedon Nov 30, 2020
I found out that it is just that my theme didn't color the
entity.name.namespace. Many themes do not, because I had this hypothesis that my theme wasn't displaying them and swapped a few themes and they also didn't. Dark+ does however. You can also add the value in the settings:Faliszek commentedon Dec 8, 2020
@jfrolich thanks for the solution, i also wanted to highlight in my theme jsx element and their attributes but I found out, that with actual grammar this it is not possible yet(?).
What i mean is, in .re file with ocaml-platform extension when i check it with
Cmd + Shift + Pand pickDM: Inspect editor tokens and scopesi get something like this when checkingbut right now they are not assigned to any scope
Is it bug... or it is something that won't be implemented?
PS. I was thinking about it creating new issue, but this is also related to jsx so i thought it might good place to point that out because i think lot's of themes are decorating jsx in this manner
Faliszek commentedon Dec 10, 2020
Hm, i can see that there is already pull request open with adding this feature
#8