Exploit new :defer input|buffer across various modules

This commit is contained in:
Henrik Lissner 2018-05-14 20:45:47 +02:00
parent 2712d606c2
commit a631c10d05
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 21 additions and 24 deletions

View file

@ -42,13 +42,16 @@ MODES should be one major-mode symbol or a list of them."
company-backends
'(company-capf company-dabbrev company-ispell company-yasnippet)
company-transformers '(company-sort-by-occurrence))
(when (featurep! +auto)
(require 'company)
(setq company-idle-delay 0.2))
:config
(global-company-mode +1))
(def-package! company
:when (featurep! +auto)
:defer input
:config (setq company-idle-delay 0.2))
(def-package! company-statistics
:hook (company-mode . company-statistics-mode)
:init (advice-add #'company-statistics-mode :around #'doom*shut-up)

View file

@ -11,8 +11,9 @@
;;
(def-package! helm-mode
:hook (doom-init . helm-mode)
:defer (input . 1)
:config
(helm-mode +1)
;; helm is too heavy for find-file-at-point
(add-to-list 'helm-completing-read-handlers-alist '(find-file-at-point . nil)))

View file

@ -24,8 +24,7 @@ immediately runs it on the current candidate (ending the ivy session)."
;;
(def-package! ivy
:init
(add-hook 'doom-init-hook #'ivy-mode)
:defer input
:config
(setq ivy-height 12
ivy-do-completion-in-region nil
@ -55,15 +54,7 @@ immediately runs it on the current candidate (ending the ivy session)."
[remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer
[remap imenu-anywhere] #'ivy-imenu-anywhere)
(nconc ivy-sort-functions-alist
'((persp-kill-buffer . nil)
(persp-remove-buffer . nil)
(persp-add-buffer . nil)
(persp-switch . nil)
(persp-window-switch . nil)
(persp-frame-switch . nil)
(+workspace/switch-to . nil)
(+workspace/delete . nil))))
(ivy-mode +1))
;; Show more buffer information in switch-buffer commands
@ -140,7 +131,8 @@ immediately runs it on the current candidate (ending the ivy session)."
(def-package! ivy-hydra
:commands (+ivy@coo/body ivy-dispatching-done-hydra)
:init
(map! :map ivy-minibuffer-map
(map! :after ivy
:map ivy-minibuffer-map
"C-o" #'+ivy@coo/body
"M-o" #'ivy-dispatching-done-hydra)
:config