emacs/undo: use doom-first-buffer-hook
This commit is contained in:
parent
b794de3ba2
commit
c4a1cc0493
1 changed files with 4 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(use-package! undo-fu
|
(use-package! undo-fu
|
||||||
:unless (featurep! +tree)
|
:unless (featurep! +tree)
|
||||||
:after-call pre-command-hook after-find-file
|
:hook (doom-first-buffer . undo-fu-mode)
|
||||||
:init
|
:init
|
||||||
;; `evil' activates undo-tree, so we must pre-emptively disable it.
|
;; `evil' activates undo-tree, so we must pre-emptively disable it.
|
||||||
(after! undo-tree
|
(after! undo-tree
|
||||||
|
@ -25,9 +25,7 @@
|
||||||
(define-key map (kbd "C-x r U") #'undo-fu-session-recover)
|
(define-key map (kbd "C-x r U") #'undo-fu-session-recover)
|
||||||
map)
|
map)
|
||||||
:init-value nil
|
:init-value nil
|
||||||
:global t)
|
:global t))
|
||||||
|
|
||||||
(undo-fu-mode +1))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! undo-fu-session
|
(use-package! undo-fu-session
|
||||||
|
@ -54,7 +52,7 @@
|
||||||
(use-package! undo-tree
|
(use-package! undo-tree
|
||||||
:when (featurep! +tree)
|
:when (featurep! +tree)
|
||||||
;; Branching & persistent undo
|
;; Branching & persistent undo
|
||||||
:after-call doom-switch-buffer-hook after-find-file
|
:hook (doom-first-buffer . global-undo-tree-mode)
|
||||||
:config
|
:config
|
||||||
(setq undo-tree-visualizer-diff t
|
(setq undo-tree-visualizer-diff t
|
||||||
undo-tree-auto-save-history t
|
undo-tree-auto-save-history t
|
||||||
|
@ -92,6 +90,4 @@
|
||||||
;; Undo-tree is too chatty about saving its history files. This doesn't
|
;; Undo-tree is too chatty about saving its history files. This doesn't
|
||||||
;; totally suppress it logging to *Messages*, it only stops it from appearing
|
;; totally suppress it logging to *Messages*, it only stops it from appearing
|
||||||
;; in the echo-area.
|
;; in the echo-area.
|
||||||
(advice-add #'undo-tree-save-history :around #'doom-shut-up-a)
|
(advice-add #'undo-tree-save-history :around #'doom-shut-up-a))
|
||||||
|
|
||||||
(global-undo-tree-mode +1))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue