summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.el2
-rw-r--r--lisp/init-ido.el62
-rw-r--r--lisp/init-ivy.el15
-rw-r--r--lisp/init-projectile.el3
4 files changed, 19 insertions, 63 deletions
diff --git a/init.el b/init.el
index 91c0a82..dbc6f1d 100644
--- a/init.el
+++ b/init.el
@@ -14,7 +14,7 @@
(require 'init-sane-defaults)
(when (eq system-type 'darwin)
(require 'init-mac))
-(require 'init-ido)
+(require 'init-ivy)
(require 'init-dired)
(require 'init-projectile)
(require 'init-server)
diff --git a/lisp/init-ido.el b/lisp/init-ido.el
deleted file mode 100644
index a47fbce..0000000
--- a/lisp/init-ido.el
+++ /dev/null
@@ -1,62 +0,0 @@
-;; ido
-(use-package ido
- :ensure nil ;; package is bundled with emacs
-
- :init
- (setq ido-enable-prefix nil
- ido-enable-flex-matching t
- ido-case-fold nil
- ido-auto-merge-work-directories-length -1
- ido-create-new-buffer 'always
- ido-use-filename-at-point nil
- ido-max-prospects 10
- ido-save-directory-list-file (expand-file-name
- ".ido.last" user-emacs-directory))
-
- :config
- (ido-mode 1))
-
-;; flx-ido
-(use-package flx-ido
- :after ido
- :init
- ;; disable ido faces to see flx highlights.
- (setq ido-use-faces nil
- flx-ido-threshold 1000)
-
- :config
- (flx-ido-mode 1))
-
-;; ido-grid-mode
-(use-package ido-grid-mode
- :after ido
- :config
- (ido-grid-mode 1))
-
-;; ido-completing-read+
-(use-package ido-completing-read+
- :after ido
- :init
- ;; automatically update blacklist when package is updated
- (setq ido-cr+-auto-update-blacklist t)
-
- :config
- (ido-ubiquitous-mode 1))
-
-;; smex
-(use-package smex
- :after ido
- :init
- ;; do not update cache automatically on every invocation
- (setq smex-auto-update nil)
-
- ;; save smex state inside emacs.d
- (setq smex-save-file (expand-file-name ".smex-items" user-emacs-directory))
-
- :bind ("M-x" . smex)
-
- :config
- ;; update cache when emacs has been idle for 60 seconds
- (smex-auto-update))
-
-(provide 'init-ido)
diff --git a/lisp/init-ivy.el b/lisp/init-ivy.el
new file mode 100644
index 0000000..6eb8490
--- /dev/null
+++ b/lisp/init-ivy.el
@@ -0,0 +1,15 @@
+;; ivy uses flx sorting if it's installed
+(use-package flx)
+
+(use-package ivy
+ :after flx
+ :diminish ivy-mode
+ :commands ivy-mode
+ :init
+ ;; use fuzzy matching by default
+ (setq ivy-re-builders-alist
+ '((t . ivy--regex-fuzzy)))
+ :config
+ (ivy-mode 1))
+
+(provide 'init-ivy)
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 2693bf2..4bffc65 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -20,6 +20,9 @@
;; avoid reading command when compiling
(setq compilation-read-command nil)
+ ;; use ivy for completion
+ (setq projectile-completion-system 'ivy)
+
:bind (;; C-x f finds file in project
("C-x f" . projectile-find-file)
;; C-c g runs git grep in project