From bac20f30c33c6849f834bad81a36e54090e23bfb Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 2 Jan 2021 16:33:23 +0100 Subject: [PATCH] Disable candidate restriction in ivy The main motivation is me often mistyping S-SPC for SPC, loosing my current candidates and frustrating myself. This is even more frustrating when inserting text into non-selection inputs (org-capture), which is why we had disabled ivy completion for org-capture previously. Since we are no using ivy--regex-ignore-order for candidate regex building anyway, input restriction is not necessary anymore, and so we remove the shortcut altogether. --- init.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 6c49d8a..95ed022 100644 --- a/init.el +++ b/init.el @@ -2160,8 +2160,14 @@ ivy-use-selectable-prompt t ivy-do-completion-in-region t ivy-re-builders-alist '((t . ivy--regex-ignore-order))) - :config (add-to-list 'ivy-completing-read-handlers-alist - '(org-capture . completing-read-default))) + :config (progn + ;; Since we are using `ivy--regex-ignore-order' for completion + ;; anyway, providing the an individual restriction in the ivy buffer + ;; is not necessary anymore. Since I often mistype S-SPC for SPC, + ;; loosing the current candidate and annoying myself, removing this + ;; shortcut is both helpful and not removing necessary + ;; functionality. + (define-key ivy-minibuffer-map (kbd "S-SPC") nil))) (use-package ivy-hydra)