From f8c1fa72fe6d7ce38d024cef21e3d77d4d670d71 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Thu, 23 Jan 2020 22:00:20 +0900 Subject: [PATCH] Update ivy format function --- emacs.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 63266c8..8d33808 100644 --- a/emacs.el +++ b/emacs.el @@ -2582,8 +2582,18 @@ Any output will be written to current buffer." ;; (defvar ivy-re-builders-alist) (set-variable 'ivy-re-builders-alist '((t . my--ivy-regex-fuzzy-ignore-order))) +;; (set-variable 'ivy-format-functions-alist +;; '((t . ivy-format-function-arrow))) (set-variable 'ivy-format-functions-alist - '((t . ivy-format-function-arrow))) + '((t . (lambda (cands) (ivy--format-function-generic + (lambda (str) + (concat "-> " + (ivy--add-face str 'ivy-current-match) + )) + (lambda (str) + (concat "| " str)) + cands + "\n"))))) (defun my--ivy-regex-fuzzy-ignore-order (str) "Re-build regex from STR for ignore-order fuzzy match."