dandavison / magit-delta

Use delta (https://github.com/dandavison/delta) when viewing diffs in Magit
MIT License
285 stars 10 forks source link

Empty lines are shown as whitespace error #14

Open The-Compiler opened 3 years ago

The-Compiler commented 3 years ago

It looks like with my setup at least (same as in #13 - Archlinux, emacs 27.1, Doom v2.0.9), diffs in the magit status buffer are indented by one space. This causes magit-delta to show empty lines as whitespace errors:

image

The same change in git diff with delta configured looks correct:

image

If I add (setq-default magit-delta-hide-plus-minus-markers nil) to my config, the issue persists:

image

If I remove (magit-delta-mode) from my config, it looks good (well, not as good as with delta!) as well:

image

dandavison commented 3 years ago

Hi @The-Compiler, thanks for this. It's been occurring for me too. Definitely needs looking into and I'll try to do that soon! If you do feel like digging in further, that would of course be fantastic (I do have other delta and magit-delta bugs to work on.)

The-Compiler commented 3 years ago

I don't really speak Lisp and I'm busy with my own projects (mainly qutebrowser) - so I won't be able to help much I'm afraid. Take your time though, in the meantime I just configured the whitespace markers in a way they are a bit more subtle.