dandavison / dandavison/delta

🚀 make whitespace changes visible as such

Open
#522 23 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.2k
Forks
572
Avg merge
11m
Merged PRs (30d)
1

Description

Hi, at first glance I couldn't find any open or closed issues on this topic. Please excuse me if I missed one.

Recently, while viewing a particular diff, I noticed that every indented line was highlighted as a difference, even though the code itself was not changed, other than being indented by _spaces_ vs. _tabs_. (PKGBUILD's are interpreted by bash, so indentation doesn't matter).

![delta_whitespace1](https://user-images.githubusercontent.com/28707521/107787047-e1512400-6d4e-11eb-8d84-5a0246174343.png)

Therefore, I think it might be useful to have an option which allows displaying whitespace characters using one or more user-defined glyphs, and/or applying the `delta.{plus,minus}-emph-style` settings to whitespace changes.

In the case that the characters to display tabs were be defined as `'‣·'` and tab size as `4`, I would imagine something like :

![delta_whitespace2](https://user-images.githubusercontent.com/28707521/107786999-d39b9e80-6d4e-11eb-8255-c87eb53eebdf.png)

Contributor guide

Open the contributing guide

Research direction

Start by tracing how delta renders whitespace-only changes and where user configuration for diff styling is defined. Compare the requested user-defined glyphs and whitespace-specific emphasis with the existing plus/minus emphasis behavior. Done means whitespace changes are visibly distinguishable without obscuring unchanged code and the new option is documented and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.