summaryrefslogtreecommitdiff
path: root/emacs/inits/11-completion.el
diff options
context:
space:
mode:
authortslil <>2022-04-17 09:50:15 -0400
committertslil <>2022-04-17 09:50:15 -0400
commitc39083045a57849e9ee86d9c74128625fd3b732f (patch)
treecba36feca51d52e9b6ef84173692b1c8a2727b8c /emacs/inits/11-completion.el
parent50761b71515b5b4a0c24a85d99e3d8b1fe6040f3 (diff)
Small changes to orderless
Diffstat (limited to 'emacs/inits/11-completion.el')
-rw-r--r--emacs/inits/11-completion.el96
1 files changed, 48 insertions, 48 deletions
diff --git a/emacs/inits/11-completion.el b/emacs/inits/11-completion.el
index a885f79..421b8a0 100644
--- a/emacs/inits/11-completion.el
+++ b/emacs/inits/11-completion.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2021-09-27 08h47 EDT (hobbies)>
+;; Time-stamp: <2022-04-17 09h49 EDT (academic)>
;; -----------------------------------------------------------------------------
;; Vertico
@@ -13,10 +13,10 @@
(use-package orderless
:ensure t
- :init
- (setq completion-styles '(orderless)
- completion-category-defaults nil
- completion-category-overrides '((file (styles . (partial-completion))))))
+ :config
+ (setq orderless-component-separator 'orderless-escapable-split-on-space
+ completion-styles '(orderless basic)
+ completion-category-overrides '((file (styles basic partial-completion)))))
(use-package savehist
:ensure t
@@ -34,7 +34,7 @@
;; Do not allow the cursor in the minibuffer prompt
(setq minibuffer-prompt-properties
- '(read-only t cursor-intangible t face minibuffer-prompt))
+ '(read-only t cursor-intangible t face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
;; Enable recursive minibuffers
@@ -46,55 +46,55 @@
(use-package consult
:ensure t
:bind (;; C-c bindings (mode-specific-map)
- ("C-c h" . consult-history)
- ("C-c m" . consult-mode-command)
- ("C-c b" . consult-bookmark)
- ("C-c k" . consult-kmacro)
- ;; C-x bindings (ctl-x-map)
- ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
- ("C-x b" . consult-buffer) ;; orig. switch-to-buffer
- ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
- ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
- ;; Custom M-# bindings for fast register access
- ("M-#" . consult-register-load)
- ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
- ("C-M-#" . consult-register)
- ;; Other custom bindings
- ("M-y" . consult-yank-pop) ;; orig. yank-pop
- ("<help> a" . consult-apropos) ;; orig. apropos-command
- ;; M-g bindings (goto-map)
- ("M-g e" . consult-compile-error)
- ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
- ("C-s" . consult-line) ;; orig. goto-line
+ ("C-c h" . consult-history)
+ ("C-c m" . consult-mode-command)
+ ("C-c b" . consult-bookmark)
+ ("C-c k" . consult-kmacro)
+ ;; C-x bindings (ctl-x-map)
+ ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
+ ("C-x b" . consult-buffer) ;; orig. switch-to-buffer
+ ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
+ ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
+ ;; Custom M-# bindings for fast register access
+ ("M-#" . consult-register-load)
+ ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
+ ("C-M-#" . consult-register)
+ ;; Other custom bindings
+ ("M-y" . consult-yank-pop) ;; orig. yank-pop
+ ("<help> a" . consult-apropos) ;; orig. apropos-command
+ ;; M-g bindings (goto-map)
+ ("M-g e" . consult-compile-error)
+ ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
+ ("C-s" . consult-line) ;; orig. goto-line
("C-r" . isearch-forward-regexp)
- ("M-g M-g" . consult-goto-line) ;; orig. goto-line
- ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
- ("M-g m" . consult-mark)
- ("M-g k" . consult-global-mark)
- ("M-g i" . consult-imenu)
- ("M-g I" . consult-project-imenu)
- ;; M-s bindings (search-map)
- ("M-s f" . consult-find)
+ ("M-g M-g" . consult-goto-line) ;; orig. goto-line
+ ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
+ ("M-g m" . consult-mark)
+ ("M-g k" . consult-global-mark)
+ ("M-g i" . consult-imenu)
+ ("M-g I" . consult-project-imenu)
+ ;; M-s bindings (search-map)
+ ("M-s f" . consult-find)
("M-s L" . consult-locate)
("C-c g" . consult-ripgrep)
("C-c G" . consult-git-grep)
- ("M-s l" . consult-line)
- ("M-s m" . consult-multi-occur)
- ("M-s k" . consult-keep-lines)
- ("M-s u" . consult-focus-lines)
- ;; Isearch integration
- ("M-s e" . consult-isearch)
- :map isearch-mode-map
- ("M-e" . consult-isearch) ;; orig. isearch-edit-string
- ("M-s e" . consult-isearch) ;; orig. isearch-edit-string
- ("M-s l" . consult-line)) ;; needed by consult-line to detect isearch
+ ("M-s l" . consult-line)
+ ("M-s m" . consult-multi-occur)
+ ("M-s k" . consult-keep-lines)
+ ("M-s u" . consult-focus-lines)
+ ;; Isearch integration
+ ("M-s e" . consult-isearch)
+ :map isearch-mode-map
+ ("M-e" . consult-isearch) ;; orig. isearch-edit-string
+ ("M-s e" . consult-isearch) ;; orig. isearch-edit-string
+ ("M-s l" . consult-line)) ;; needed by consult-line to detect isearch
:init
;; Optionally configure the register formatting. This improves the register
;; preview for `consult-register', `consult-register-load',
;; `consult-register-store' and the Emacs built-ins.
(setq register-preview-delay 0
- register-preview-function #'consult-register-format)
+ register-preview-function #'consult-register-format)
;; Optionally tweak the register preview window.
;; This adds thin lines, sorting and hides the mode line of the window.
@@ -102,7 +102,7 @@
;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref
- xref-show-definitions-function #'consult-xref)
+ xref-show-definitions-function #'consult-xref)
:config
(consult-customize
@@ -111,7 +111,7 @@
consult-ripgrep consult-git-grep consult-grep
consult-bookmark consult-recent-file consult-xref
- consult--source-file consult--source-project-file consult--source-bookmark
+ consult--source-buffer consult--source-project-buffer consult--source-bookmark
:preview-key (kbd "M-."))
(defun previous-history-or-next ()
@@ -139,7 +139,7 @@
;; Projectile integration
(autoload 'projectile-project-root "projectile")
- (setq consult-project-root-function #'projectile-project-root)
+ (setq consult-project-function #'projectile-project-root)
;; Ues consult for capfs
(setq completion-in-region-function #'consult-completion-in-region))