city-lights-syntax-atom icon indicating copy to clipboard operation
city-lights-syntax-atom copied to clipboard

Incorrect JSX syntax highlighting with Babel

Open thawsitt opened this issue 6 years ago β€’ 4 comments

I have this issue when I open a .jsx file using Babel ES6 Javascript selected as the language.

I believe text like "Welcome to React" should be white instead of green.

Imgur

thawsitt avatar Jul 19 '18 14:07 thawsitt

Hi @thawsitt ,

The text should indeed be white, thanks for making an issue out of this. I'm using the React package myself which also uses JSX, and that goes fine. I will check where this goes wrong and update you soon!

noudadrichem avatar Jul 19 '18 15:07 noudadrichem

May I ask why you're using a 3rd party syntax highlighter for ES6? Atom supports this by default. JSX is the only thing that needs an extra package.

noudadrichem avatar Jul 19 '18 15:07 noudadrichem

Hi @noudadrichem,

I am using language-babel package because I want atom to support JSX syntax on .js files. (as recommended by React). One Dark syntax theme seems to work fine in this case, but city-lights is still my favorite. 😊

thawsitt avatar Jul 20 '18 14:07 thawsitt

Haha glad you like it! I'll take a look at this! Should be a small change. I'm using the React package (https://atom.io/packages/react) which works fine with JSX. Maybe you can use it in the mean time😊😊

I'll keep you up to date

noudadrichem avatar Jul 20 '18 14:07 noudadrichem