-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add JSON-TextMate
#119
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for textmate-grammars-themes failed.
|
So, I think this project by @RedCMD is wonderful, a labor of love by a master at his craft, and that every TextMate grammar author should be aware of it. But I don't think it should be added here. First, it doesn't meet Shiki's popularity threshold:
I don't personally care about that rule given that the quality of the project is high. So I'm partly just using it as an excuse. What I care about more is that Shiki's JS engine doesn't support it, unless RedCMD decides to refactor for JS engine support. That's because RedCMD is a true Oniguruma expert, more so than probably at least 99% of TextMate grammar authors, and enjoys pushing all the boundaries with Oniguruma, including using extremely esoteric Oniguruma syntax/behavior. Shiki's JS engine is extremely close to getting to 100% support for all grammars provided by Shiki, and @antfu has in the past supported the idea that this repo should require compatibility with the JS engine, going forward. |
It's an awesome project, thanks for making it! However, arguably, I am not sure if this could be counted as a language. But considering that the whole fact TextMate grammar is about TextMate grammar, I am happy to have it. However, yeah I think at this moment, we would wish it uses polyfill-able syntaxes so we could run it with the js engine of Shiki as @slevithan pointed out. |
I can improve the "invalid group" error. But yeah, you'll currently get that if the character following
For context, after having done a ton of work at this point to get to 100% JS engine support for all the grammars in this library, I'm looking to slow down on Oniguruma-To-ES for the time being. So I'd request PRs if you want it to support extremely rare features like
I don't plan to support conditionals for now unless support is submitted as a PR. Conditionals were only used by one grammar in this library (Swift), and at least some of Swift's usage of them was not emulatable in JS (which is why my request to refactor them, as you've seen). Your usage |
Are there any other currently-unsupported features you're using other than |
I'm removing the occurrences of |
VSCode's JSON TextMate Grammars
https://github.com/RedCMD/TmLanguage-Syntax-Highlighter