about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-18 12:11:28 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-18 12:11:28 +0000
commit5df54bc253ba4dde746dc0474c9ec6afe0850862 (patch)
tree5c515b28abce53394da3948126e4858d23d32e73
parent6b55b3ab10305e8add1cd0b42fdf026e621727f7 (diff)
downloaddotfiles-5df54bc253ba4dde746dc0474c9ec6afe0850862.tar.gz
Add magit-delta
-rw-r--r--.emacs.d/lisp/init-git.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-git.el b/.emacs.d/lisp/init-git.el
index f6f05a5..3904e50 100644
--- a/.emacs.d/lisp/init-git.el
+++ b/.emacs.d/lisp/init-git.el
@@ -273,7 +273,8 @@
      ("r" "Refresh state (update modeline)" my/magit-refresh-state)
      ("m" "Update master/main" my/magit-update-master)
      ("d" "Difftastic Diff (dwim)" my/magit-diff-with-difftastic)
-     ("s" "Difftastic Show" my/magit-show-with-difftastic)])
+     ("s" "Difftastic Show" my/magit-show-with-difftastic)
+     ("D" "Toggle magit-delta-mode" my/toggle-delta-mode)])
   (transient-append-suffix 'magit-dispatch "!"
     '("#" "Extra Magit Cmds" my/magit-extra-commands))
   (define-key magit-status-mode-map (kbd "#") #'my/magit-extra-commands)
@@ -284,6 +285,13 @@
   (magit-diff-refine-ignore-whitespace nil)
   (magit-diff-highlight-trailing t))
 
+(use-package magit-delta
+  :config
+  (defun my/toggle-delta-mode ()
+    (interactive)
+    (call-interactively #'magit-delta-mode)
+    (magit-refresh)))
+
 (use-package magit-todos)
 
 (use-package forge