-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add syntax highlighting for .nanorc files and Git-related dotfiles #4343
Conversation
@vmg, @lildude Would one of you care to test this with the grammar-compiler, please? 😬 I, erm, had to fudge |
|
That should be whitelisted. The field is supported by Atom, although it doesn't appear to have any impact on Lightshow when I tried it... 😞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great! We should make a bit of noise to let peeps know you did this!
I have a couple comments on usage below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sensible addition! Let's see what @lildude says.
Did you |
Yup. Whipped out the big |
😨 Okay, erm, I'll leave this up to @vmg to figure out. 😰 |
Woohooo!!! Worked it out. This bad boy is to blame 🤦♂️ : Comment it out and 🎉
Oh yes, I needed to rebuild the image too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got no objections with this if @pchaigno doesn't.
I feel like I'm to blame with my hacky |
@Alhadis There's one unresolved discussion above: I think we should remove the |
More dotfile highlighting to come in future the next time I'm stabbed by an impulsive urge to work on some random grammar at 4:45 am. =) |
@Alhadis 😄 Any idea of when this will be deployed to GitHub? |
@perlun Updates to Linguist become live on GitHub once a new release of Linguist has been cut. The release cycle isn't set in stone, but it generally happens roughly once per month. |
@Alhadis Alright, I see. I assumed it was being continuously delivered. 😉 |
Well, it is in a way — every change made to the repository's master branch triggers a new job in CI, which alerts contributors to unexpected build failures. But that's a different affair to actually deploying code live on GitHub. |
Yeah, I know. I was just trying to be funny. 😄 Anyway, thanks for the change and have a Merry Christmas soon there in the "land down under"! 🐊 🏄 etc. 😃 |
Fixes #4335 by adding a bespoke highlighting grammar for
.nanorc
files, as well as several extra config formats:.gitignore
(and ignore-type manifests based on its syntax; e.g.,.npmignore
,.dockerignore
, etc).gitconfig
,.gitmodules
.gitattributes
Description
Since we're adding support for a language solely on aesthetic grounds, I thought to add highlighting for a few other widespread (and obvious) config formats: those used by Git itself.
Even if this addition is strictly superficial, I expect it'll be noticed (and welcomed) by many.
You'll notice
.gitignore
has been listed as "Ignore List". There are so many analogous formats based upon thegitignore(5)
syntax, or are similar enough that they're practically interchangeable (e.g.,.bzrignore
,.cvsignore
).There are probably countless other
ignore
-like formats with enough adoption to qualify for registration, but I've only added those I'm aware of (...which was exhausting enough already).Checklist:
The extension of the new language is used in hundreds of repositories on GitHub.com:
.atomignore
: 399 files / 378 repos / 243 users.babelignore
: 211 files / 178 repos / 139 users.bzrignore
: ~4,504 files.coffeelintignore
: 1,283 files, 998 repos, 850 users.cvsignore
: ~364,972 results.dockerignore
: ~219,938 results.eslintignore
: ~1,877,266 results.gitattributes
: ~5,658,784 results.gitconfig
filename: ~99,163 results.gitconfig
extension: 1,452 files / 1,211 repos / 1,170 users.gitmodules
filename: ~1,328,213 files.gitignore
extension: ~120,877 results.gitignore
filename: ~30,930,758 results.nanorc
filename: ~56,021 results.nanorc
extension: ~47,713 results.nodemonignore
: ~6,366 results.npmignore
: ~57,496,063 results.prettierignore
: ~24,822 results.stylelintignore
: ~10,198 results.vscodeignore
: ~11,323 resultsgitignore-global
: ~14,552 resultsI have included a real-world usage sample for all extensions added in this PR:
.atomignore
: MIT.babelignore
: Improvised.bzrignore
: Python license.coffeelintignore
: Improvised.cvsignore
: Artistic license.dockerignore
: Apache 2.0.eslintignore
: MIT.gitattributes
: One of my dotfiles, ISC-licensed.gitconfig
: MIT.gitignore
: One of my dotfiles, ISC-licensed.gitmodules
: MIT (First ~20 lines of Linguist's.gitmodules
).nanorc
: MIT.nodemonignore
: MIT.npmignore
: ISC, improvised based on a.gitignore
file fromAlhadis/Utils
.prettierignore
: MIT.stylelintignore
: ISC.vscodeignore
: MITaliases.gitconfig
: ISCFinale.gitignore
: Creative Commonsgitignore_global
: MITgitignore-global
: MITgitignore
: Creative Commonsnanorc.nanorc
: MITnanorc
: Improvised, based on documented defaultsI have
includedwritten several syntax highlighting grammars: https://github-lightshow.herokuapp.com/.gitattributes
: [ 1 | 2 | 3 ].gitconfig
: [ 1 | 2 | 3 ].gitignore
: [ 1 | 2 | 3 ].nanorc
: [ 1 | 2 | 3 ]