Skip to content
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

Fix diff-hl faces #141

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Fix diff-hl faces #141

merged 1 commit into from
Mar 26, 2024

Conversation

mrcnski
Copy link
Contributor

@mrcnski mrcnski commented Mar 25, 2024

Before

Screenshot 2024-03-25 at 10 40 52

After

Screenshot 2024-03-25 at 10 40 05

Note

About :inherit fringe, I've been using it without any issues in nimbus-theme for some years. It just makes sure that the background matches the fringe background. Not relevant here, but in nimbus-theme it also makes sure that any other properties (like boldness) get cleared.

@nyxkrage nyxkrage merged commit d395b93 into catppuccin:main Mar 26, 2024
1 check passed
@nyxkrage
Copy link
Collaborator

Thanks!

@LionyxML
Copy link
Contributor

@nyxkrage / @mrcnski

Fun fact, this PR broke both of my legs.

I even opened a discussion here: dgutov/diff-hl#216. It took me hours to find the culprited.

Diff HL also have a margin-mode, and if you'd like to have it working on Emacs terminal (TUI) or even prefer margin over fringes. It is mandatory that you propertize the background to achieve the "bar effect". Diff hl just stopped working (because my markins were " " blank spaces, I just wanted the background colorized to mimic the "bar" gutter) and as it happens to be, it was there, just invisible.

Fun fact 2.

I was precisely developing a minor mode (https://github.com/LionyxML/flymake-margin) and with it trying to solve the original problem of "merging" hl diff and flymake (both on margin). So I would have the background color showing the git status and the foreground showing a flymake mark.

I think we all had good ideas bumping into each other.

So, hl-diff is beautiful on fringe now, but behaves diferently on TUI :/

Well Idn what to do by now. Having the same user experience on both terminal and gui drives my choices of everything :(

I might ask the hl-diff author to create a face specifically for margin mode, but again, would catppuccin use a transparent background by default?

I might be better of patching all in my config.

@dgutov
Copy link

dgutov commented Mar 28, 2024

I might ask the hl-diff author to create a face specifically for margin mode, but again, would catppuccin use a transparent background by default?

@LionyxML FWIW, diff-hl has two sets of faces: one for the fringe (default), and another for the margin (in which all faces inherit from the corresponding in the former set). So you should be able to tweak the looks of either separately.

@LionyxML
Copy link
Contributor

@dgutov thanks man!

I managed to revert this in my config and kind of find a "fix" to the "overlap", (making it appear side by side, diff-hl and flymake, both on margin).

image

As to the Catppuccin implementation, it will only break things if someone (like me) have a pretty customizable diff-hl configuration. Testing with the defaults (the thin line on fringe or chars with margin) it's alright.

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.

4 participants