Skip to content

FR: Possibility to revert color only for whitespace-only diff-tokens #7809

@Vampire

Description

@Vampire

Is your feature request related to a problem? Please describe.
The possibilities to configure how the diffs are displayed are great, I just have one annoyance left I couldn't get over.

  • Having all tokens underlined is for me very hard to read and also is easily confusable with underscores being added or removed, especially in whitespace-only tokens, so I disabled underlining using colors."diff token".underline.
    With Image you don't really know whether it is foo baz to foo barbaz or whether it is foo __bazto foo barbaz or maybe foo _ bazto foo barbaz or foo _bazto foo barbaz.
  • This greatly improves the diff readability for me, except for the case where only whitespace changed in a token as the token is no longer identifiable at all, so I reversed the colors using colors."diff token".reverse.
  • This makes the whitespace-only tokens identifiable again, but for all other tokens decreases the readability again in a similar manner the underlining did, just that now you cannot confuse the underlining with an underscore.

Describe the solution you'd like
It would be amazing if I could configure reverse to false, underline to false, and additionally a setting that for leading and trailing whitespace in a diff token (and thereby also whitespace-only tokens) reverse is true, so that readability of other tokens is not hurt while keeping whitespace changes identifiable like this:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    polish🪒🐃Make existing features more convenient and more consistent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions