diff options
author | jao <jao@gnu.org> | 2021-07-19 21:13:56 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-07-19 21:13:56 +0100 |
commit | 32b76334166ee7fb79d4bfbe433cdc280b91714c (patch) | |
tree | cb0fbeb6f82db326c56285f52f93f29771d55ab8 | |
parent | 5737b2e30e805af7b3d527b9547e08e14410e102 (diff) | |
download | elibs-32b76334166ee7fb79d4bfbe433cdc280b91714c.tar.gz elibs-32b76334166ee7fb79d4bfbe433cdc280b91714c.tar.bz2 |
corfu: show doc about signature
-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))) |