From 0e18684eef402794f470b5a10658002136cb5195 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 20 Mar 2022 10:12:46 +0800 Subject: Separate completion config (emacs) --- .emacs.d/lisp/init-minibuffer.el | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to '.emacs.d/lisp/init-minibuffer.el') diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index bf38675..6fa5061 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -18,29 +18,6 @@ (define-key vertico-map (kbd "C-u") (lambda () (interactive) (vertico-previous (/ vertico-count 2))))) -(when (gx/maybe-require-package 'orderless) - (setq orderless-matching-styles '(orderless-literal orderless-regexp orderless-flex)) - - (defun gx/orderless-without-if-bang (pattern _index _total) - (cond - ((equal "!" pattern) - '(orderless-literal . "")) - ((string-prefix-p "!" pattern) - `(orderless-without-literal . ,(substring pattern 1))))) - - (defun gx/orderless-flex-if-twiddle (pattern _index _total) - (when (string-suffix-p "~" pattern) - `(orderless-flex . ,(substring pattern 0 -1)))) - - (setq orderless-style-dispatchers '(gx/orderless-without-if-bang - gx/orderless-flex-if-twiddle)) - - (defun gx/setup-completion-in-minibuffer () - (setq-local completion-styles '(substring orderless) - completion-category-defaults nil - completion-category-overrides '((file (styles partial-completion))))) - (add-hook 'minibuffer-setup-hook #'gx/setup-completion-in-minibuffer)) - (when (gx/maybe-require-package 'consult) (with-eval-after-load 'evil (evil-define-key 'normal 'global -- cgit v1.2.3