diff options
author | Guangxiong Lin <[email protected]> | 2022-03-13 00:07:38 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-03-13 00:09:13 +0800 |
commit | 38ab771977e6511d02df06cb908824707d728303 (patch) | |
tree | 2c77fb392b35e8e7c2105d3bb29f24b34c5388f7 /.emacs.d/lisp/init-ivy.el | |
parent | 0097d1f3e22565ffb6db689c06ee2f9610cd45d0 (diff) | |
download | dotfiles-38ab771977e6511d02df06cb908824707d728303.tar.gz dotfiles-38ab771977e6511d02df06cb908824707d728303.tar.bz2 dotfiles-38ab771977e6511d02df06cb908824707d728303.zip |
Refactor emacs config
Use less use-package features
Diffstat (limited to '.emacs.d/lisp/init-ivy.el')
-rw-r--r-- | .emacs.d/lisp/init-ivy.el | 18 |
1 files changed, 18 insertions, 0 deletions
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 "<leader>fb") 'ivy-switch-buffer + (kbd "<leader>fm") 'counsel-recentf + (kbd "<leader>fc") 'counsel-M-x + (kbd "<leader>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) |