-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Get syntax highlighting working on GitHub #4341
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
🤘 What needs to be done for this? |
@steveklabnik Support needs to be added to linguist, and GitHub needs to update pygments to something newer than this commit. I do not know the process for getting GitHub to do the pygments upgrade, but I imagine mentioning it prominently in the linguest pull request would be a start. Are you interested in updating linguist? |
I am interested but I've never done it before, so I can't guarantee that I'll be successful. Let me see what I can do. |
So it looks like it's actually https://github.com/tmm1/pygments.rb that needs updated. Linguist already has Rust, though I guess the |
AFAIU Changing |
So I'm not clear at all on what needs to be done now to make this happen. Does anybody? I think we probably need to do the following:
|
OK, after asking on IRC this is my understanding.
I think there is nothing left to do but wait for GitHub to upgrade pygments (or bug them to do so). At that point GitHub will support an ancient version of Rust. Then we continue waiting for them to upgrade to the next release, at which point we'll be like a year out of date again. Not a great situation, but as Rust stabilizes, presumably GitHub and Rust will, over the course of years, converge on the correct grammar. |
Awesome. :) |
@strcat mentioned that this needs to be updated to use the rust lexer (not 'text only'): https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L1098. Presumably this needs to be done after they upgrade pygments to 1.6, and there is some evidence that they've already done this since gists do use syntax highlighting when told to use 'rust' explicitly. |
I submitted a pull request to linquist to turn on the Rust lexer. |
Coming soon! |
I just pushed support for Rust on github.com (e.g. https://github.com/mozilla/rust/blob/master/src/libsyntax/attr.rs ). Enjoy! return match we_have_rust {
let yes = yep::word(1,2,3);
data("R U S T");
} |
@tnm Awesome! Thanks for deploying that so fast. |
❤️ ❤️ 💚 💖 |
This is beautiful. ❤️ |
run the full test suite under FreeBSD
Pygments has a lexer now.
Related: #1198
The text was updated successfully, but these errors were encountered: