Magit-delta brings Delta diff highlighting to Magit

Last update:

I use Magit (an Emacs mode) as convenience UI for Git. On the CLI, I appreciate the improvements of Delta highlighting over the default diff output. Yet I only recently discovered magit-delta to combine the two: have Magit display diff output with the beauty and improvements of Delta highlighting.

Figure 1: Screenshot of magit-delta on a sample sqlite commit

Figure 1: Screenshot of magit-delta on a sample sqlite commit

Steps:

  1. Install Delta. On macOS: brew install git-delta.

  2. Install magit-delta from MELPA. Of course Magit is needed too.

  3. Activate with M-x magit-delta-mode inside a magit diff buffer and refresh the buffer with g or M-x magit-refresh (gr on Spacemacs). See manual on how to activate automatically.

  4. On Spacemacs, magit-delta is part of the git layer. Enable it automatically with:

    (setq-default dotspacemacs-configuration-layers
                  '(
                    ;; other layers
                    (git :variables
                         git-enable-magit-delta-plugin t)
                    ;; other layers
                    ))
    

See all posts in the archive.

Comments

Comments were disabled in March 2022. Since this page was created earlier, there may have been previous comments which are now inaccessible. Sorry.