-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Relax Downloads policy for new syntaxes #1262
Comments
Startup speed is still a large concern, but I'm open to the idea of aggregating other download metrics together to get the 10k minimum. For example, that would allow the following to meet the criteria: 3000 downloads from JetBrains plugins It would have to be considered on a case by case basis, however. I wouldn't consider npm to be a valid metric, since something like a templating language could be a dependency of a larger and more popular framework, yet go unused by most projects installing the framework. |
We could also think about other (additional) policies like: the syntax can be added if GitHub also supports it.
We should probably measure the actual slowdown when adding more and more syntaxes. Shouldn't be too hard with some scripting and the available set of submodules. |
@eth-p what's affecting the startup speed so much? Is it the single |
We did some digging in #951, and the majority of the startup time is spent deserializing the syntaxes.
It's always possible, but it would likely require a non-trivial amount of refactoring and possibly even a few upstream changes to do it, though. Most of the syntax detection (e.g. by file name, by first content line) is handled by Syntect, which relies on the information provided from the .sublime-syntax files which get serialized into Splitting the Basically, the main thing stopping someone from adding it is the significant amount of time, effort, upstream collaboration, and regression testing behind it. The silver lining is that if we did do it that way, we could also easily add syntax detection support for nix-shell (#684) though. |
Probably not worth it then since the current solution is already quite good enough. I expect that the download limit / current set of embedded syntaxes won't be seen as a problem any more when the process of adding them gets a bit simpler. |
👍 Another possible criterion: a language is popular on Repology. |
Regarding nix-shell syntax detection support, @eth-p, I was thinking it could potentially be solved with a new syntax definition specifically for nix-shell files which would read the second line shebang and push into the relevant syntax, similar to how the Markdown syntax definition works with embedded code fence blocks. To simplify it in terms of maintenance (with needing to have a rule for each "interpreter" we want highlighting support for, and potentially wanting to ensure any newly added syntax definitions are easily included) I think we could auto generate it with a script, which would look through each |
@keith-hall Great idea! We might even be able to do that as part of the asset compilation, actually. I'm not as familiar with syntect as you are, but if there's a way to extract the first line mappings and syntax name, we can generate the syntax yaml on the fly as part of |
We can most likely do this to some extent once #951 is solved |
As @sharkdp suggested.
The text was updated successfully, but these errors were encountered: