Gitpod: JSX Syntax not working

Created on 17 Feb 2019  路  7Comments  路  Source: gitpod-io/gitpod

Describe the bug

JSX syntax not working when I create a file with this extension.

To Reproduce

Open a file with .jsx extension

Expected behavior

Highlight code with specified syntax.

bug javascript

All 7 comments

AFAIK JSX is not yet supported but can be in a future plugin support via VS Code extensions. The only JS superset with integration to Theia, which is native to Monaco, is TypeScript

That is not true. JSX as well as TSX is support. I'll look into it, thanks for creating the issue.

I tried to reproduce but couldn't.
For instance the snapshot below contains js files with JSX components in it, which work for me.
Could you clarify what is not working and maybe share a repository to reproduce?

Open in Gitpod

screenshot 2019-02-18 at 08 34 35

Hello. Thank you for replying.

Yeah, I actually did exactly what you do there: I used 'JavaScript' Language Mode, and it solved the JSX issue.

However, there's a problem that occurs when I select 'JavaScript React' in the Language Mode: syntax doesn't highlight. By default, when I create a file with .jsx extension (MyComponent.jsx, for example), 'JavaScript React' is established as Language by the editor, and JSX syntax is not highlighted in this new file. Take a look:

screenshot from 2019-02-18 19-45-50

Ok, thank you, so it is broken with *.jsx files. We'll look into it.

Upvote on this!

This works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ColbyWTaylor picture ColbyWTaylor  路  3Comments

iksaif picture iksaif  路  3Comments

kittaakos picture kittaakos  路  3Comments

Kreyren picture Kreyren  路  3Comments

bytekast picture bytekast  路  3Comments