aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-ivy.el
blob: 07731fa96d7d5809ebb1349874e22ff6d0431392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(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))

(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-initial-inputs-alist nil)
(setq ivy-re-builders-alist
      '((t . ivy--regex-ignore-order)
        (t . ivy--regex-fuzzy)
        (t . ivy--regex-plus)
        (t . regexp-quote)
        (t . ivy-regex)))

(provide 'init-ivy)