diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2024-11-02 22:05:13 +0100 | 
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-02 22:05:13 +0100 | 
| commit | 241d53e5b47ef70902538c9a645e743f38a5626f (patch) | |
| tree | d03f00fd8ec8619978fb863aa769c9512b8fea57 /.config/emacs/modules/mm-completion.el | |
| parent | 93f6b53704a657a58a441cec2ed23eaa5f719393 (diff) | |
emacs: Add additional completions configuration
Diffstat (limited to '.config/emacs/modules/mm-completion.el')
| -rw-r--r-- | .config/emacs/modules/mm-completion.el | 49 | 
1 files changed, 43 insertions, 6 deletions
| diff --git a/.config/emacs/modules/mm-completion.el b/.config/emacs/modules/mm-completion.el index ee0d50a..692e3d2 100644 --- a/.config/emacs/modules/mm-completion.el +++ b/.config/emacs/modules/mm-completion.el @@ -22,15 +22,52 @@    (marginalia-field-width 50)) -;;; Orderless Completion Style +;;; Minibuffer Completion Styles + +(use-package minibuffer +  :bind ( :map minibuffer-local-completion-map +          ("SPC" . nil) +          ("?"   . nil)) +  :custom +  (completion-styles '(basic substring orderless)) +  (completion-category-defaults nil)    ; Avoid needing to override things +  (completion-category-overrides +   '((file             (styles . (basic partial-completion orderless))) +     (bookmark         (styles . (basic substring))) +     (library          (styles . (basic substring))) +     (imenu            (styles . (basic substring orderless))) +     (consult-location (styles . (basic substring orderless))) +     (kill-ring        (styles . (basic substring orderless))))) +  (completion-ignore-case t) +  (read-buffer-completion-ignore-case t) +  (read-file-name-completion-ignore-case t)) -;; TODO: Make sure this doesn’t suck  (use-package orderless    :ensure t +  :after minibuffer +  :custom +  (orderless-matching-styles '(orderless-prefixes orderless-regexp))) + + +;;; Disable Minibuffer Recursion Level + +(use-package mb-depth +  :hook (after-init . minibuffer-depth-indicate-mode) +  :custom +  (enable-recursive-minibuffers t)) + + +;;; Don’t Show Defaults After Typing + +;; Usually if a minibuffer prompt has a default value you can access by +;; hitting RET, the prompt will remain even if you begin typing (meaning +;; the default will no longer take effect on RET).  Enabling this mode +;; disables that behaviour. + +(use-package minibuf-eldef +  :hook (after-init . minibuffer-electric-default-mode)    :custom -  (completion-styles '(orderless basic)) -  (orderless-matching-styles '(orderless-prefixes)) -  (completion-category-overrides '((file (styles basic partial-completion))))) +  (minibuffer-default-prompt-format " [%s]"))  ;;; Completion Popups @@ -77,4 +114,4 @@      (dolist (command #'(pulsar-recenter-top pulsar-reveal-entry))        (add-hook 'consult-after-jump-hook command)))) -(provide 'mm-completion) +(provide 'mm-completion)
\ No newline at end of file |