From 32b76334166ee7fb79d4bfbe433cdc280b91714c Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 19 Jul 2021 21:13:56 +0100 Subject: corfu: show doc about signature --- completion.org | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'completion.org') 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))) -- cgit v1.2.3