tokyo-night / tokyo-night-vscode-theme

A clean, dark Visual Studio Code theme that celebrates the lights of Downtown Tokyo at night.
MIT License
1.74k stars 119 forks source link

JS React red font #78

Closed QuentinVdr closed 11 months ago

QuentinVdr commented 1 year ago

Hello, I get red font color in my react component when I'm not using tsx. Is that normal or a bug? image

DonMiller9294 commented 12 months ago

it could the syntax or color scheme based on the theme you are using. have your ran the code? is every working?

QuentinVdr commented 12 months ago

In my screenshot it's just the code from a default react project by using npx create-react-app. And I modify the theme just by adding the Higher Contrast Settings that be recommend in the README and add the rulers. And even without my settings I get the color font in red.

enkia commented 11 months ago

It's not normal, should be white gray color. Can you place your cursor at the word save and run 'Inspect Editor Tokens and Scopes' from the command palette and paste the result here?

QuentinVdr commented 11 months ago

here's the screenshot and the text of the Inspect Editor Tokens and Scopes. if you want to check is just a default react app create with npx create-react-app my-app. image

language | jsx -- | -- standard token type | Other foreground | #DE5971 background | #1A1B26 contrast ratio | 4.70 textmate scopes | JSXNested JSXAttrs meta.tag.jsx JSXNested JSXAttrs meta.tag.jsx JSXNested JSXAttrs meta.tag.js xmeta.function.js source.js -- | -- foreground | meta.tag{ "foreground": "#DE5971" }
enkia commented 11 months ago

Hmm, can't replicate the issue. Must be an extension or the theme isn't actually mine, but a fork / mod. Even the brackets on the HTML tags are different. Mine look like this:

image

I did notice that regular jsx text is a bit bright (white) so will push a fix for that, though.

QuentinVdr commented 11 months ago

It's my bad i found why it's don't work like usual. It's cause i use Babel javascript extension. I don't know if you have planned to support this syntax highlighting or not ?

enkia commented 11 months ago

All good. It looks pretty well supported aside from the issue you saw and a couple other things I noticed. I've pushed a fix! Let me know how it works out.

QuentinVdr commented 11 months ago

Thanks you a lot! Your job is really nice. Love it!