From f8d7c5796a73510b3d26596dcc0f00e213b93784 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 16 Mar 2022 00:49:33 +0800 Subject: Improve ivy match (emacs) --- .emacs.d/lisp/init-ivy.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/init-ivy.el b/.emacs.d/lisp/init-ivy.el index db59481..8b944ac 100644 --- a/.emacs.d/lisp/init-ivy.el +++ b/.emacs.d/lisp/init-ivy.el @@ -1,6 +1,8 @@ (when (gx/maybe-require-package 'counsel) (add-hook 'after-init-hook (lambda () (ivy-mode 1)))) +(gx/maybe-require-package 'flx) + (with-eval-after-load 'ivy (gx/diminish 'ivy-mode)) @@ -13,8 +15,9 @@ (setq ivy-use-virtual-buffers t) (setq ivy-count-format "(%d/%d) ") +(setq ivy-initial-inputs-alist nil) (setq ivy-re-builders-alist - '((read-file-name-internal . ivy--regex-fuzzy) - (t . ivy--regex-plus))) + '((ivy-switch-buffer . ivy--regex-plus) + (t . ivy--regex-fuzzy))) (provide 'init-ivy) -- cgit v1.2.3