Skip to content

Reference revision diff highlights #235

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

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

dgutov
Copy link
Owner

@dgutov dgutov commented Apr 5, 2025

This splits highlighting into two groups: diff between the buffer contents and HEAD (or staging area (*)), and diff between the latter and diff-hl-reference-revision (if set). Looks like this:

diff-hl-references-highlights

The new indicators use a specific bitmap and new faces, both of which can be customized. The default bitmap is an empty one, so on the screenshot it's the lines without the "border".

A new fn option is added as well: diff-hl-highlight-reference-function. For more advanced customization.

(*) This change also uses the new indicators for the staged changes (Git only, naturally) when diff-hl-show-staged-changes is customized to nil. In a way that conflates those pieces of data, but I expect that most users will either use one or the other, and the behavior still makes sense when combined.

@dgutov dgutov marked this pull request as draft April 5, 2025 01:58
@dgutov dgutov changed the title Reference revision highlights Reference revision diff highlights Apr 5, 2025
@dgutov dgutov force-pushed the reference-revision-highlights branch from 41df159 to eb8933f Compare April 28, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant