Skip to content

Commit

Permalink
Add magit-delta
Browse files Browse the repository at this point in the history
Document a workaround for the issue seen in dandavison/magit-delta#13.
  • Loading branch information
kaushalmodi authored and yuravg committed Mar 2, 2022
1 parent 04a3ec0 commit eec7fb7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion setup-files/setup-magit.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;; Time-stamp: <2021-09-27 13:45:50 kmodi>
;; Time-stamp: <2021-10-22 13:28:59 kmodi>

;; Contents:
;;
Expand Down Expand Up @@ -349,6 +349,25 @@ It is assumed that the author has only one or two names."
magit-log-mode-hook))
(add-hook hook #'emojify-turn-on-emojify-mode))))

;; https://github.com/dandavison/magit-delta
;; Requires the user to download the `delta' executable and put it somewhere
;; in the PATH before starting emacs.
;;
;; Due to a current issue in delta, you cannot enable its `line-numbers' feature without
;; messing up the diffs in magit. A workaround is that you can enable `side-by-side'
;; mode. That shows line numbers in side-by-side mode in the terminal, but leaves
;; `magit-delta' unaffected!
;;
;; [delta]
;; # https://github.com/dandavison/magit-delta/issues/13
;; # line-numbers = true # Don't do this.. messes up diffs in magit
;; #
;; side-by-side = true # Display a side-by-side diff view instead of the traditional view
(when (executable-find "delta")
(use-package magit-delta
:ensure t
:hook (magit-mode . magit-delta-mode)))


(provide 'setup-magit)

Expand Down

0 comments on commit eec7fb7

Please sign in to comment.