PSA: Test your textmate grammars in TextMate #6756
Replies: 2 comments
-
it doesn't I assume this is your PR? lifeart/vsc-ember-syntax#77 in your grammar the VSCode does not discard the 2nd |
Beta Was this translation helpful? Give feedback.
-
|
If someone like me who doesn't have a mac wants to test a grammar with TextMate, there is a way using a GitHub Action running on macOS like this one and you can get something like this : |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So with the latest release of linguist, we had included fixes for our glimmer-js and glimmer-ts grammars. We used NovaLightshow to test our grammar as it was capable of reproducing the issues we were seeing, and everything works perfectly there so we had hoped the same would be true for GitHub. It also works perfectly in VSCode and ShikiJS (and possibly other textmate derived syntax highlighting engines).
When we began testing the latest rollout of linguist everything seemed fine until we tested the simplest case our authoring format allows. Namely this
I was stumped on how to test this as it worked everywhere else except GitHub. That is until I decided to install TextMate and try our grammar there, what I saw was identical to how GitHub was highlighting (or not in this case).
Now I had somewhere I could test I managed to fix the grammar
So if you grammar works everywhere but GitHub, and you're wondering how to most accurately test your grammar for GitHub support, I can definitely recommend using TextMate as it seems GitHub's highlighting engine matches TextMate's one-to-one, whereas other engines do not and might highlight things perfectly fine even if GitHub wont.
Beta Was this translation helpful? Give feedback.
All reactions