aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-ivy.el
blob: b1fb73a05ff35d652e84f977f8f1ffa16cc8bebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)