From ee6e4a8b5cc37da2333d5efa91b087a55a99f754 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Mar 2019 17:58:58 -0500 Subject: [PATCH] Fix ivy--queue-exhibit: void-function nil error Until Yevgnen/ivy-rich#51 is merged --- modules/completion/ivy/config.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index a1ca0ff75..c7b1b8b7b 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -93,7 +93,17 @@ immediately runs it on the current candidate (ending the ivy session)." (colplist (plist-get plist :columns)) (switch-buffer-alist (assq 'ivy-rich-candidate colplist))) (when switch-buffer-alist - (setcar switch-buffer-alist '+ivy-rich-buffer-name)))) + (setcar switch-buffer-alist '+ivy-rich-buffer-name))) + + (defun +ivy*rich-counsel-function-docstring (candidate) + (let ((doc (replace-regexp-in-string + ":\\(\\(before\\|after\\)\\(-\\(whilte\\|until\\)\\)?\\|around\\|override\\|\\(filter-\\(args\\|return\\)\\)\\) advice:[ ]*‘.+?’[\r\n]+" + "" + (or (ignore-errors (documentation (intern-soft candidate))) "")))) + (if (string-match "^\\(.+\\)\\([\r\n]\\)?" doc) + (setq doc (match-string 1 doc)) + ""))) + (advice-add #'ivy-rich-counsel-function-docstring :override #'+ivy*rich-counsel-function-docstring)) (def-package! counsel