summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-01-22 11:39:31 -0800
committerFranck Cuny <franck@fcuny.net>2023-01-22 11:39:31 -0800
commit99204461d7784a45932ea1ca4bed5582a21f25ec (patch)
treef89e679fe12e4a90d3bb431d8fb4e6f1c9f953de /emacs
parentfix(markdown): workaround related to imenu (diff)
downloademacs.d-99204461d7784a45932ea1ca4bed5582a21f25ec.tar.gz
ref(completion): replace corfu-doc with corfu-popupinfo
corfu-doc is deprecated and corfu-popupinfo is what is recommended to
use.

Change-Id: I6039d91839276f75e93551bc84ce56bcb872be1d
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-completion.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/emacs/custom/my-completion.el b/emacs/custom/my-completion.el
index fb6ce66..e66f0ce 100644
--- a/emacs/custom/my-completion.el
+++ b/emacs/custom/my-completion.el
@@ -7,7 +7,7 @@
 (require 'cape)
 (require 'consult)
 (require 'corfu)
-(require 'corfu-doc)
+(require 'corfu-popupinfo)
 (require 'orderless)
 (require 'marginalia)
 (require 'savehist)
@@ -35,6 +35,16 @@
 
 (advice-add #'corfu-insert :after #'corfu-send-shell)
 
+;; enable corfu popup mode
+(corfu-popupinfo-mode t)
+
+;; transition quickly
+(setq corfu-popupinfo-delay '(0.25 . 0.1))
+
+;; don't hide the popup when
+;; transitioning between candidates
+(setq corfu-popupinfo-hide nil)
+
 ;; Silence the pcomplete capf, no errors or messages!
 (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent)
 
@@ -72,9 +82,6 @@
 (global-set-key (kbd "M-s L") 'consult-line-multi)
 
 ;;; hooks
-;; display a documentation popup for completion candidate when using
-;; corfu
-(add-hook 'corfu-mode-hook #'corfu-doc-mode)
 
 (provide 'my-completion)