Add TSX Support? #247
Replies: 2 comments
-
@danjguzman Can you see if the syntax issue is resolved in https://phcode.dev ? For the typescript extension support, we are adding better language intelligence directly in core without any extensions. Please follow this issue for details: phcode-dev/phoenix#27 |
Beta Was this translation helpful? Give feedback.
-
I tested it on PHCode and it appears the issue would be resolved there. Any following code no longer loses its syntax highlight colors. The only issue I do see in the PHCode editor is that the syntax colors are off, there is this additional plumb looking color that doesn't match the lavender "variable" color. In the original Brackets Dark Theme, all of them would match the same color to keep them all consistent. Overall syntax highlighting is much improved. I would prefer to use this as a desktop, not browser app though. |
Beta Was this translation helpful? Give feedback.
-
Currently the only real TypeScript-JSX (React-TS) support in Brackets for proper syntax highlighting is an old extension that is not maintained. The problem is that it hasn't been updated and using ?. Optional Chaining (obj.key?.x), it removes the syntax highlighting for any code after using Optional Chaining creating total havoc.
Without Optional Chaining. Notice let object = {}; has proper syntax highlighting.
With Optional Chaining. Notice let object = {}; has the wrong syntax highlighting, and all code below optional chaining will be white.
This is also, sometimes, an issue with Template Literals, where all JSX/HTML code and any props will just be orange.
This is also an issue when using JSX for syntax highlighting. It would be great to get this updated like other editors that properly highlight syntax.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions