-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove support for .sublime-syntax #3214
Conversation
👍 thanks. |
Hey! Hard to find a bit more information about this - does linguist support I wrote a new grammar in that format for a Sublime Text package I maintain, and am wondering if I should just make a new repository & package and leave the old grammar package in-place, to keep the current package compatible with Linguist. The latest comment I can find on the matter is this one: #4157 (comment) |
No, Linguist doesn't support |
Hi, I understand that Sublime Text syntax is no longer supported. But there is not nearly enough information on why? What does it mean "until we find a better solution" — Is anyone actively looking for it (I bet not)? Why are you saying that "it's not likely to in the future either"? What can I do as a contributor? |
Support for As for why, the syntax highlighting engine expects the grammars to be in JSON which is converted from the various TextMate-compatible formats when the grammar is "compiled" for each release.
It means until someone updates the grammar "compiler" to be able to handle this different format and all the Sublime grammar features and convert it to our required JSON format.
You bet right... no one is looking at this, no money for your bet though 😆
Because no one is working on it and there isn't sufficient demand to dedicate time and resources to it. I think most people aim for VSCode compatibility first (which is TextMate compatible) and then consider Sublime Text later. Another thing to keep in mind is GitHub is very very slowly moving away from the TextMate compatible grammars in favour of TreeSitter grammars. There isn't a formal method for adding a Treesitter grammar yet. See #6073 for more details.
If you really want to, you can take a stab at updating the current compiler to support the newer Warning: it's written in Go, is very basic, makes lots of assumptions, and has no tests 😁 |
Thanks for the info. Seems strange to me that there is low demand, since Sublime Text ecosystem provides quite some good-quality syntax definitions. And IIRC some ambiguous grammars are not possible to represent with the simpler TextMate rules (e.g. in QML we have this weird right-hand side of bindings that can be either an
Yeah, that's unlikely to happen soon. There are little-to-no comments, and I'm having hard times trying to understand what is it even compiling into 😅
Good to know. I've heard of some attempts to implement a tree sitter grammar for QML within KDE community, and apparently there is also this 3rd party project on GitHub: yuja/tree-sitter-qmljs. I should probably audit them. Just briefly skimming through the commit history, I've already found a missing feature in my plugin, and quickly implemented it via SublimeText/QML#25 |
This pull request removes support for
.sublime-syntax
grammar files inconvert-grammars
until we find a better solution.