From 38ab771977e6511d02df06cb908824707d728303 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 13 Mar 2022 00:07:38 +0800 Subject: Refactor emacs config Use less use-package features --- .emacs.d/lisp/init-ivy.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .emacs.d/lisp/init-ivy.el (limited to '.emacs.d/lisp/init-ivy.el') diff --git a/.emacs.d/lisp/init-ivy.el b/.emacs.d/lisp/init-ivy.el new file mode 100644 index 0000000..b1fb73a --- /dev/null +++ b/.emacs.d/lisp/init-ivy.el @@ -0,0 +1,18 @@ +(use-package counsel :ensure t :defer t) + +(add-hook 'after-init-hook (lambda () (ivy-mode 1))) + +(with-eval-after-load 'evil + (evil-define-key 'normal ivy-mode-map + (kbd "fb") 'ivy-switch-buffer + (kbd "fm") 'counsel-recentf + (kbd "fc") 'counsel-M-x + (kbd "fl") 'swiper)) + +(setq ivy-use-virtual-buffers t) +(setq ivy-count-format "(%d/%d) ") +(setq ivy-re-builders-alist + '((read-file-name-internal . ivy--regex-fuzzy) + (t . ivy--regex-plus))) + +(provide 'init-ivy) -- cgit v1.2.3