aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-ivy.el26
-rw-r--r--.emacs.d/lisp/init-minibuffer.el29
2 files changed, 29 insertions, 26 deletions
diff --git a/.emacs.d/lisp/init-ivy.el b/.emacs.d/lisp/init-ivy.el
deleted file mode 100644
index 07731fa..0000000
--- a/.emacs.d/lisp/init-ivy.el
+++ /dev/null
@@ -1,26 +0,0 @@
-(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)
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
new file mode 100644
index 0000000..5ed684b
--- /dev/null
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -0,0 +1,29 @@
+(gx/maybe-require-package 'consult)
+
+(when (gx/maybe-require-package 'vertico)
+ (add-hook 'after-init-hook #'vertico-mode))
+
+(setq vertico-resize t
+ vertico-count 20
+ vertico-cycle t)
+
+(defun gx/setup-completion-in-minibuffer ()
+ (setq-local completion-styles '(substring orderless)
+ completion-category-defaults nil
+ completion-category-overrides '((file (styles partial-completion)))))
+
+(when (gx/maybe-require-package 'orderless)
+ (add-hook 'minibuffer-setup-hook #'gx/setup-completion-in-minibuffer))
+
+(with-eval-after-load 'evil
+ (when (gx/maybe-require-package 'consult)
+ (evil-define-key 'normal 'global
+ (kbd "<leader>fb") 'consult-buffer
+ (kbd "<leader>fm") 'consult-recent-file
+ (kbd "<leader>fc") 'execute-extended-command
+ (kbd "<leader>fl") 'consult-line)))
+
+(when (gx/maybe-require-package 'savehist)
+ (add-hook 'after-init-hook #'savehist-mode))
+
+(provide 'init-minibuffer)