-
Notifications
You must be signed in to change notification settings - Fork 414
Redo of background colors to improve diff readability #690
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
base: master
Are you sure you want to change the base?
Conversation
NOTE: There appears to be a bug in testing. Lines in the left hand side are being colored green in some cases.
NOTE: This version does not compile due to a conflict between some remaining owo_colors types and some yansi types.
NOTE: Colors need adjusting. Sub-line differences seem to have the same background color as the rest of the line.
Use color theme for default background colors.
|
This looks better. |
No. If you have more detail about what you'd like to see in custom theme support please share. Right now, I have implemented this in a way that could support custom themes, specifically
|
|
@gerhardol Is this what you have in mind? |
|
More or less those links. But using the same names for the slot (with some additions and deletions) would simplify. Difftastic is more than Git, but as Git is dominant, at least configuration and documentation is simpler if the concepts ar the same. In my case to use Difftastic as a difftool from within another tool, I would need some way to control tis at runtime, prefeably with environment variables. So a comma separated list with the Git names of the slots is my preference. A user may want other colors from the command line and use other theme colors when embedded in the app. A sidetrack... Will try to build and try this branch myself |
|
Hi, what is the state of this PR? I think this is an amazing job and would be really having it merged |
I keep getting blocked on one small issue or other that prevents this feature from being merged into difftastic. For some reason I just can't seem to grok this particular codebase. Every time I've tried to implement this change properly and cleanly I'm always missing something. Just can't seem to find the "root" places in the code that need to be modified to handle all code paths cleanly. It's been a while since I've taken a look. I'll try to take another crack at it soon. |
|
That sounds really great! This is the only thing keeping me from using difftastic. Thank you so much for your efforts! |
This is a complete rewrite of #286 on top of the current version of
difftastic(with the exception of the last cargo update which is causing a compilation error for me #689).Previous Issues
Hopefully this addresses the issues that @Wilfred mentioned in the last pull request:
6inVersion 0.6) and delimiters (the(beforereverse) is missing: not sure about this, please let me know if you still see this issueThemes
This pull request lays the groundwork for theming of
difftasticin the future. The missing piece here is the ability to parse theme information from a config file. Internally, the various styles are stored in aHashMapand a lookup with fallback is performed when retrieving various values.Notes and Caveats
While this is a decent proof of concept there are probably a few issues in need of attention:
NO_COLORis not currently supported even thoughyansisupports conditional styling quite well.Reasoning
I'm creating this pull request now, in spite of it not being finished, since I'd like feedback on the above.