mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Restore reverted ee6e4a8b
Although Yevgnen/ivy-rich#51 was merged upstream, due to Melpa issues, it hasn't been pulled. I'll restore this under it has.
This commit is contained in:
@ -93,7 +93,17 @@ immediately runs it on the current candidate (ending the ivy session)."
|
|||||||
(colplist (plist-get plist :columns))
|
(colplist (plist-get plist :columns))
|
||||||
(switch-buffer-alist (assq 'ivy-rich-candidate colplist)))
|
(switch-buffer-alist (assq 'ivy-rich-candidate colplist)))
|
||||||
(when switch-buffer-alist
|
(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
|
(def-package! counsel
|
||||||
|
Reference in New Issue
Block a user