-
Notifications
You must be signed in to change notification settings - Fork 458
Add GitHub Linguist config for Jsonnet #43
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
Comments
I'd love that. How hard is it? Is it just a case of identifying some keywords and regular expressions? |
I just added a syntax file that works for atom. I understand that is the first step on this process. |
FYI apparently GitHub's policy is that there needs to be a few hundred samples before they would be willing to accept a patch to Linguist. Bazel's pull request was unfortunately rejected for the time being for this reason. |
Here is the latest Jsonnet usage in GitHub: https://github.com/search?utf8=✓&q=extension%3Ajsonnet+NOT+nothack&type=Code&ref=searchresults With over 300 files, we should now be meeting GitHub's criteria for adding Jsonnet to Linguist. I have created a patch to Linguist that I will run through the proper channels before sending the PR. In the meantime, according to the Linguist CONTRIBUTING.md, the grammar must be in its own repository since it will be included by Linguist as a Git submodule. We will need to move the language-jsonnet Atom syntax package you added into its own repository before we can submit the PR to Linguist. |
It says in there that it needs to be hundreds of repos, not hundreds of files. I think we only have 10 repos or so so maybe we can't do this yet. |
Though from github-linguist/linguist#2348:
I'd be fine with waiting until we have some more usage before sending a PR. In comparison, there are 546 .capnp files, though these files are spread out over more repos, and capnp was added along with a bunch of other languages in bulk in github-linguist/linguist#1714. |
Ok in that case perhaps we should try. It would definitely be useful. |
Any idea how we would maintain the syntax highlighting after the fact? |
Are you referring to the language-jsonnet repo that contains the Atom syntax files? |
Yeah if we pushed changes to that would it all just work, or would we have to open a ticket to get it brought in. |
Yes, we just need to move the contents of language-jsonnet into the repo. Then, in my PR for Linguist, I just add the repo to .gitmodules: davidzchen/linguist@51f6542 |
By the way, do you have a preference for the color to use for Jsonnet in GitHub repository language stats? |
Not really. Is there any kind of system you know of that other languages On Thu, Sep 17, 2015 at 1:56 AM, David Z. Chen [email protected]
|
Not in particular. It's usually pretty arbitrary, though some languages pick colors that match their logo color. Here's a sample of some of the colors used by different languages: https://github.com/ozh/github-colors I'm currently using |
The website is #402010 maybe we should use that. On Thu, Sep 17, 2015 at 5:05 AM, David Z. Chen [email protected]
|
Sounds good to me. |
Syntax highlighting for Jsonnet has been working in Github for a while now. Closing. |
We should add an entry to github/linguist for Jsonnet so that GitHub can 1) add proper syntax highlighting for displaying .jsonnet files and 2) include them in the language stats for repositories.
The text was updated successfully, but these errors were encountered: