Rewrite :defer semantics
:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where SYMBOL is a hook and INTEGER is a number of idle seconds before the package is autoloaded, or just the integer (as per the default behavior of :defer). Also fixes an issue where switch-buffer-deffered packages (like smartparens) wouldn't load.
This commit is contained in:
parent
9a2c4f297c
commit
94f9e43f25
9 changed files with 22 additions and 28 deletions
|
@ -48,7 +48,7 @@ MODES should be one major-mode symbol or a list of them."
|
|||
|
||||
(def-package! company
|
||||
:when (featurep! +auto)
|
||||
:defer input
|
||||
:defer pre-command-hook
|
||||
:config (setq company-idle-delay 0.2))
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
;;
|
||||
|
||||
(def-package! helm-mode
|
||||
:defer (input . 1)
|
||||
:defer (pre-command-hook . 1)
|
||||
:config
|
||||
(helm-mode +1)
|
||||
;; helm is too heavy for find-file-at-point
|
||||
|
|
|
@ -24,7 +24,7 @@ immediately runs it on the current candidate (ending the ivy session)."
|
|||
;;
|
||||
|
||||
(def-package! ivy
|
||||
:defer input
|
||||
:defer (pre-command-hook . 1)
|
||||
:config
|
||||
(setq ivy-height 12
|
||||
ivy-do-completion-in-region nil
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
(def-package! evil-collection
|
||||
:when (featurep! +everywhere)
|
||||
:defer input
|
||||
:defer pre-command-hook
|
||||
:preface
|
||||
;; must be set before evil/evil-collcetion is loaded
|
||||
(setq evil-want-integration nil
|
||||
|
@ -325,7 +325,7 @@ the new algorithm is confusing, like in python or ruby."
|
|||
(def-package! evil-snipe
|
||||
:commands (evil-snipe-mode evil-snipe-override-mode
|
||||
evil-snipe-local-mode evil-snipe-override-local-mode)
|
||||
:defer input
|
||||
:defer pre-command-hook
|
||||
:init
|
||||
(setq evil-snipe-smart-case t
|
||||
evil-snipe-scope 'line
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(def-package! evil-goggles
|
||||
:when (featurep! :feature evil)
|
||||
:defer input
|
||||
:defer pre-command-hook
|
||||
:init
|
||||
(setq evil-goggles-duration 0.05
|
||||
evil-goggles-pulse nil ; too slow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue