mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 20:10:23 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -4,18 +4,33 @@
|
||||
(setenv "GIT_ASKPASS" "git-gui--askpass"))
|
||||
|
||||
|
||||
(after! log-view
|
||||
(set-evil-initial-state!
|
||||
'(log-view-mode
|
||||
vc-git-log-view-mode
|
||||
vc-hg-log-view-mode
|
||||
vc-bzr-log-view-mode
|
||||
vc-svn-log-view-mode)
|
||||
'emacs)
|
||||
(map! :map log-view-mode-map
|
||||
"j" #'log-view-msg-next
|
||||
"k" #'log-view-msg-prev))
|
||||
|
||||
|
||||
(after! vc-annotate
|
||||
(set-popup-rules!
|
||||
'(("^\\vc-d" :select nil) ; *vc-diff*
|
||||
("^\\vc-c" :select t))) ; *vc-change-log*
|
||||
(set-evil-initial-state!
|
||||
'(vc-annotate-mode vc-git-log-view-mode)
|
||||
'normal)
|
||||
'(("^\\*vc-diff" :select nil) ; *vc-diff*
|
||||
("^\\*vc-change" :select t))) ; *vc-change-log*
|
||||
(set-evil-initial-state! 'vc-annotate-mode 'normal)
|
||||
|
||||
;; Clean up after itself
|
||||
(define-key vc-annotate-mode-map [remap quit-window] #'kill-current-buffer))
|
||||
|
||||
|
||||
(after! vc-dir
|
||||
(set-evil-initial-state! 'vc-dir-mode 'emacs))
|
||||
|
||||
|
||||
(after! git-timemachine
|
||||
;; Sometimes I forget `git-timemachine' is enabled in a buffer, so instead of
|
||||
;; showing revision details in the minibuffer, show them in
|
||||
@@ -53,9 +68,8 @@ info in the `header-line-format' is a good indication."
|
||||
|
||||
|
||||
(use-package! git-commit
|
||||
:after-call after-find-file
|
||||
:hook (doom-first-file . global-git-commit-mode)
|
||||
:config
|
||||
(global-git-commit-mode +1)
|
||||
(set-yas-minor-mode! 'git-commit-mode)
|
||||
|
||||
;; Enforce git commit conventions.
|
||||
@@ -71,3 +85,15 @@ otherwise in default state."
|
||||
(when (and (bound-and-true-p evil-mode)
|
||||
(bobp) (eolp))
|
||||
(evil-insert-state)))))
|
||||
|
||||
|
||||
(after! browse-at-remote
|
||||
(setq browse-at-remote-add-line-number-if-no-region-selected nil)
|
||||
|
||||
;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo is
|
||||
;; detached. This creates broken links. I think it is more sensible to
|
||||
;; fall back to master in those cases.
|
||||
(defadvice! +vc--fallback-to-master-branch-a ()
|
||||
"Return 'master' in detached state."
|
||||
:after-until #'browse-at-remote--get-local-branch
|
||||
"master"))
|
||||
|
||||
Reference in New Issue
Block a user