bump: :completion
abo-abo/swiper@2a25a6fb5b -> abo-abo/swiper@8dc02d5b72 company-mode/company-mode@1a0fc12a9c -> company-mode/company-mode@e1d331a64e elken/yasnippet-capf@744dedb783 -> elken/yasnippet-capf@4c2e33d70c emacs-helm/helm@f8949afd9b -> emacs-helm/helm@06e0cf0148 minad/cape@f61da109a9 -> minad/cape@9110956a51 minad/consult-flycheck@754f5497d8 -> minad/consult-flycheck@3b999ae983 minad/consult@fe48522800 -> minad/consult@0c3f53916e minad/corfu@cdc3e13ad3 -> minad/corfu@921dd7c97e minad/marginalia@da72da4622 -> minad/marginalia@50a51c69f0 minad/vertico@ba650a7ab9 -> minad/vertico@c682ef50e6 oantolin/embark@9c166c4b96 -> oantolin/embark@19a13e344e oantolin/orderless@53f5204ad3 -> oantolin/orderless@49d1fdfb80 radian-software/prescient.el@0765418e43 -> radian-software/prescient.el@2b8a8b4122 rainstormstudio/nerd-icons-completion@c2db8557a3 -> rainstormstudio/nerd-icons-completion@426a1d7c29 Close: #7977 Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
This commit is contained in:
parent
3bced4dbbe
commit
1ec4bac75e
6 changed files with 34 additions and 35 deletions
|
@ -34,26 +34,6 @@ TAB/S-TAB.")
|
|||
|
||||
(use-package! corfu
|
||||
:hook (doom-first-input . global-corfu-mode)
|
||||
:init
|
||||
(add-hook! 'minibuffer-setup-hook
|
||||
(defun +corfu-enable-in-minibuffer ()
|
||||
"Enable Corfu in the minibuffer."
|
||||
(when (pcase +corfu-want-minibuffer-completion
|
||||
('aggressive
|
||||
(not (or (bound-and-true-p mct--active)
|
||||
(bound-and-true-p vertico--input)
|
||||
(and (featurep 'auth-source)
|
||||
(eq (current-local-map) read-passwd-map))
|
||||
(and (featurep 'helm-core) (helm--alive-p))
|
||||
(and (featurep 'ido) (ido-active))
|
||||
(where-is-internal 'minibuffer-complete
|
||||
(list (current-local-map)))
|
||||
(memq #'ivy--queue-exhibit post-command-hook))))
|
||||
('nil nil)
|
||||
(_ (where-is-internal #'completion-at-point
|
||||
(list (current-local-map)))))
|
||||
(setq-local corfu-echo-delay nil)
|
||||
(corfu-mode +1))))
|
||||
:config
|
||||
(setq corfu-auto t
|
||||
corfu-auto-delay 0.24
|
||||
|
@ -80,6 +60,25 @@ TAB/S-TAB.")
|
|||
(add-to-list 'corfu-continue-commands #'+corfu/smart-sep-toggle-escape)
|
||||
(add-hook 'evil-insert-state-exit-hook #'corfu-quit)
|
||||
|
||||
(defun +corfu-enable-in-minibuffer-p ()
|
||||
"Return non-nil if Corfu should be enabled in the minibuffer.
|
||||
See `+corfu-want-minibuffer-completion'."
|
||||
(pcase +corfu-want-minibuffer-completion
|
||||
('nil nil)
|
||||
('aggressive
|
||||
(not (or (bound-and-true-p mct--active)
|
||||
(bound-and-true-p vertico--input)
|
||||
(and (featurep 'auth-source)
|
||||
(eq (current-local-map) read-passwd-map))
|
||||
(and (featurep 'helm-core) (helm--alive-p))
|
||||
(and (featurep 'ido) (ido-active))
|
||||
(where-is-internal 'minibuffer-complete
|
||||
(list (current-local-map)))
|
||||
(memq #'ivy--queue-exhibit post-command-hook))))
|
||||
(_ (where-is-internal #'completion-at-point
|
||||
(list (current-local-map))))))
|
||||
(setq global-corfu-minibuffer #'+corfu-enable-in-minibuffer-p)
|
||||
|
||||
;; HACK: If you want to update the visual hints after completing minibuffer
|
||||
;; commands with Corfu and exiting, you have to do it manually.
|
||||
(defadvice! +corfu--insert-before-exit-minibuffer-a ()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/corfu/packages.el
|
||||
|
||||
(package! corfu :pin "cdc3e13ad312f5f12b3f78f842fff0b398eb4473")
|
||||
(package! cape :pin "f61da109a9e4491614938c300291060fd8855c1b")
|
||||
(package! corfu :pin "921dd7c97ec41fe8ef81dd5f5a08b0f717586c86")
|
||||
(package! cape :pin "9110956a5155d5e3c460160fa1b4dac59322c229")
|
||||
(when (modulep! +icons)
|
||||
(package! nerd-icons-corfu :pin "7077bb76fefc15aed967476406a19dc5c2500b3c"))
|
||||
(when (and (not (modulep! :completion vertico))
|
||||
|
@ -14,4 +14,4 @@
|
|||
(when (modulep! :os tty)
|
||||
(package! corfu-terminal :pin "501548c3d51f926c687e8cd838c5865ec45d03cc"))
|
||||
(when (modulep! :editor snippets)
|
||||
(package! yasnippet-capf :pin "744dedb7837d0c7e07817d36ec752a0cd813f55c"))
|
||||
(package! yasnippet-capf :pin "4c2e33d70cd1d95cf1e08d134b058a6dd90a99c9"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue