summaryrefslogtreecommitdiffhomepage
path: root/completion.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-07-19 21:13:56 +0100
committerjao <jao@gnu.org>2021-07-19 21:13:56 +0100
commit32b76334166ee7fb79d4bfbe433cdc280b91714c (patch)
treecb0fbeb6f82db326c56285f52f93f29771d55ab8 /completion.org
parent5737b2e30e805af7b3d527b9547e08e14410e102 (diff)
downloadelibs-32b76334166ee7fb79d4bfbe433cdc280b91714c.tar.gz
elibs-32b76334166ee7fb79d4bfbe433cdc280b91714c.tar.bz2
corfu: show doc about signature
Diffstat (limited to 'completion.org')
-rw-r--r--completion.org10
1 files changed, 10 insertions, 0 deletions
diff --git a/completion.org b/completion.org
index 5604eb9..497a1f4 100644
--- a/completion.org
+++ b/completion.org
@@ -42,6 +42,16 @@
corfu-min-width 20
corfu-max-width 100
corfu-excluded-modes '(eshell-mode))
+ :config
+ (advice-add #'corfu--goto :after #'corfu--show-docsig)
+
+ (defun corfu--show-docsig (_index)
+ (let ((message-log-max nil))
+ (if-let (fun (and (>= corfu--index 0)
+ (plist-get corfu--extra-properties :company-docsig)))
+ (message "%s" (funcall fun (nth corfu--index corfu--candidates)))
+ (message ""))))
+
:bind (:map corfu-map
("TAB" . corfu-next)
("S-TAB" . corfu-previous)))