Open TheWitheredStriker opened 1 year ago
I'm assuming that YoYo has a TextMate grammar already for GML, but if not here's a draft I wrote that does a decent job without a lot of complexity:
I found this GML.tmLanguage file inside of the GameMaker.app contents
/Applications/GameMaker.app/contents/MacOS/x86_64/TextEditor2/Languages/GML.tmLanguage
Congratulations you are uncovering all our secrets... we use TextMate grammars for the New Code Editor - so you will find this getting updated as we move forward
Oooo, nice! @rwkay what's the licensing on this? Can I modify and distribute this official tmlanguage file in my projects?
I would wait until New Code Editor has been released and we have most of the issues sorted (just now it is only internal testing from the QA team, until it has been hammered by the community for a few months, I would only consider it Beta).
Is your feature request related to a problem?
Linguist is the provider of GitHub's syntax highlighting. It currently does not have an actual grammar for GML, so they use a C++ highlighter for GML code instead. As you can likely tell, this is not a great reading experience:
Describe the solution you'd like
It'd be great if someone could submit a GML grammar file (e.g. a TextMate one) to Linguist per the steps here and here.
Describe alternatives you've considered
I originally opened this issue on the repository for Scotch, a GML VS Code extension. Just now, the maintainer informed me that GameMaker is moving more towards open source along with plans to support TextMate grammar, and thus told me to open a ticket here, so that I could have it handled in an official capacity.
I also attempted, long ago, to add a GML grammar to Linguist myself (but couldn't get the commands to work).
Additional context
NovaLightshow allows grammars to be tested on code in the browser.