Highlight JSX in TypeScript.
This PR adds JSX highlighting to TypeScript natively using Monaco's Monarch tokenizer, along with a few other nice to have changes:
- Highlight
...as a keyword - Highlight
export/etcas control-flow keywords - Highlight class fields
- Highlight function/class names
- Highlight var/let/const names
- Highlight new Foo
- Highlight function/method calls
- Highlight JSX
- Highlight type names as type.identifier
It has been thoroughly tested on https://vanillajsx.com/monarch/ but it would be useful to have more people test for edge cases.
A few unrelated tests are failing such as PHP and Less, which I don't understand how they're related since my code is isolated to one file. The failures look to just be whitespace errors, but it's hard to tell.
I didn't update the TypeScript tests yet, so they're failing too.
Hey, is there any followup to this PR? @thesoftwarephilosopher
@microsoft-github-policy-service agree
community PR approvals Started 101007m ago! Anyway this could be merged? It would be so useful to have built-in JSX/TSX highlighting. 😄