diff options
-rw-r--r-- | completion.org | 10 |
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))) |