mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add & use add-transient-hook! macro
This commit is contained in:
@ -13,10 +13,7 @@
|
||||
:init
|
||||
;; Ensure `yas-reload-all' is called as late as possible. Other modules could
|
||||
;; have additional configuration for yasnippet. For example, file-templates.
|
||||
(add-hook 'yas-minor-mode-hook '+snippets|load)
|
||||
(defun +snippets|load (&rest _)
|
||||
(yas-reload-all)
|
||||
(remove-hook 'yas-minor-mode-hook '+snippets|load))
|
||||
(add-transient-hook! yas-minor-mode-hook (yas-reload-all))
|
||||
|
||||
(add-hook! (text-mode prog-mode snippet-mode markdown-mode org-mode)
|
||||
'yas-minor-mode-on)
|
||||
|
@ -33,10 +33,8 @@
|
||||
;; mode-line.
|
||||
(def-package! evil-anzu
|
||||
:init
|
||||
(defun +evil*lazy-load-evil-anzu (&rest _) (require 'evil-anzu))
|
||||
(advice-add 'evil-ex-start-search :before '+evil*lazy-load-evil-anzu)
|
||||
(add-transient-hook! evil-ex-start-search (require 'evil-anzu))
|
||||
:config
|
||||
(advice-remove 'evil-ex-start-search '+evil*lazy-load-evil-anzu)
|
||||
(setq anzu-cons-mode-line-p nil
|
||||
anzu-minimum-input-length 1
|
||||
anzu-search-threshold 250))
|
||||
|
Reference in New Issue
Block a user