-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Beginning of more beautiful rustc --explain #25033
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This sounds quite cool. Can you maybe add a screenshot? I guess by only using blue and red for highlights, you don't need to concern yourself with detecting the terminals background color (since red and blue both work on dark and light backgrounds). Do you have any plans for a more complex color scheme? |
Errors and warnings are already colored. Rustc uses som kind of term library for this. You should look into it. |
@GuillaumeGomez, @bluss is right, there is a |
Oh nice ! I'll take a look then ! |
It would be good to have this code not directly inside |
@huonw: Don't worry, it was just a start to have an idea of what it'll look like after. For now, the code is just ugly. |
I created an |
I'm concerned about the maintainability of this code. Could we use something like https://github.com/rkitover/vimpager or http://www.gnu.org/software/src-highlite/ for this purpose, instead? We have the vim definitions already so this would be a matter of shelling out, of course conditional on vim being present. The build changes may be non-trivial but would be more future-proof, I think. Thoughts? |
I'm a fan of emacs actually. :-p Once again, this code is just a preview, I don't intend to continue this one. I'd prefer use something from inside the compiler (I'm thinking about the |
One way I thought of doing this would be to write a custom renderer for Hoedown (the markdown parser used by |
@michaelsproul: hum... Why not. Originally, I was going to use the |
@GuillaumeGomez: It's a whole lot of FFI and stuff, but if you're up for it... |
I am. I'll start to see how |
@GuillaumeGomez So I am confused as to what should happen with this current PR -- should we close it, as you are now trying an alternative approach? |
I'm still working on rustdoc. I don't have much time recently (and I'm sorry about that). So can you keep it open while I start the other one please ? |
Closing due to inactivity, but I'm looking forward to see where this goes! |
As mentionned in #24523, here is the beginning of the more beautiful printing. Only tested under linux. It doesn't -yet- manage terminals which doesn't handle color printing. Any opinion is welcome.