summaryrefslogtreecommitdiff
path: root/modules/vc-config.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/vc-config.el')
-rw-r--r--modules/vc-config.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/vc-config.el b/modules/vc-config.el
index a936e890..141f6e17 100644
--- a/modules/vc-config.el
+++ b/modules/vc-config.el
@@ -115,6 +115,30 @@
(forge-create-issue)
(user-error "Not in a forge repository")))
+(defun cj/goto-git-gutter-diff-hunks ()
+ "Jump to git-gutter diff hunks using consult.
+Searches for lines starting with + or - (diff markers) and allows
+interactive selection to jump to any changed line in the buffer."
+ (interactive)
+ (require 'git-gutter)
+ (consult-line "^[+\\-]"))
+
+;; -------------------------------- Difftastic ---------------------------------
+;; Structural diffs for better git change visualization
+;; Requires: difft binary (installed via pacman -S difftastic)
+
+(use-package difftastic
+ :defer t
+ :commands (difftastic-magit-diff difftastic-magit-show)
+ :bind (:map magit-blame-read-only-mode-map
+ ("D" . difftastic-magit-show)
+ ("S" . difftastic-magit-show))
+ :config
+ (eval-after-load 'magit-diff
+ '(transient-append-suffix 'magit-diff '(-1 -1)
+ [("D" "Difftastic diff (dwim)" difftastic-magit-diff)
+ ("S" "Difftastic show" difftastic-magit-show)])))
+
;; --------------------------------- VC Keymap ---------------------------------
;; Ordering & sorting prefix and keymap