mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 12:30:59 +01:00
add hook to make commit hashes clickable
This commit is contained in:
@@ -107,16 +107,29 @@
|
|||||||
;; :bind (("s-i" . blamer-show-commit-info)
|
;; :bind (("s-i" . blamer-show-commit-info)
|
||||||
;; ("C-c i" . ("s-i" . blamer-show-posframe-commit-info)))
|
;; ("C-c i" . ("s-i" . blamer-show-posframe-commit-info)))
|
||||||
:defer 20
|
:defer 20
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
(blamer-idle-time 0.3)
|
(blamer-idle-time 0.3)
|
||||||
(blamer-min-offset 70)
|
(blamer-min-offset 70)
|
||||||
|
|
||||||
:custom-face
|
:custom-face
|
||||||
(blamer-face ((t :foreground "#7a88cf"
|
(blamer-face ((t :foreground "#7a88cf"
|
||||||
:background nil
|
:background nil
|
||||||
:height 140
|
:height 140
|
||||||
:italic t)))
|
:italic t)))
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(defalias 'blame 'blamer-mode))
|
(defalias 'blame 'blamer-mode)
|
||||||
|
|
||||||
|
;; in addition to blaming I also like to follow the lead, so make
|
||||||
|
;; the hash lead to the commit by clicking on it.
|
||||||
|
(defun blamer-callback-show-commit-diff (commit-info)
|
||||||
|
(interactive)
|
||||||
|
(let ((commit-hash (plist-get commit-info :commit-hash)))
|
||||||
|
(when commit-hash
|
||||||
|
(magit-show-commit commit-hash))))
|
||||||
|
|
||||||
|
(setq blamer-bindings '(("<mouse-1>" . blamer-callback-show-commit-diff))))
|
||||||
|
|
||||||
(provide 'init-magit)
|
(provide 'init-magit)
|
||||||
;;; init-magit.el ends here
|
;;; init-magit.el ends here
|
||||||
|
|||||||
Reference in New Issue
Block a user