selectrum: improve ivy parity

- add `:pg` bindings
- add `selectrum-minibuffer-map` to `+default-minibuffer-maps`
- add `consult-notmuch`
- add selectrum option for `mu4e-completing-read-function`
- document more parity failings
This commit is contained in:
Itai Y. Efrat 2021-04-29 21:46:48 +03:00
parent e8dc511c74
commit 7ec7134947
7 changed files with 42 additions and 6 deletions

View file

@ -19,7 +19,15 @@ https://github.com/minad/marginalia/issues/59
In ivy, backspace on =/foo/bar/!= (where =!= is the cursor) leads to =/foo/!=
In selectrum, it leads to =/foo/bar!=
** TODO =SPC s B=
** TODO ~:pg~ support
** TODO modules to look over
- lookup
- taskrunner (doesn't seem to be an interface yet)
- pass (creating embark-pass can't be that hard)
- irc
- org (check, might be fine)
- counsel-minibuffer-history analogue
- counsel-company analogue
- bibtex
* PROJ Other
** TODO bind =consult-lsp-diagnostics= to something?
** TODO test out bibtex-actions, check if more configuration should be added

View file

@ -0,0 +1,14 @@
;; completion/selectrum/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :editor evil)
;;;###autoload (autoload '+selectrum:project-search "completion/ivy/autoload/evil" nil t)
(evil-define-command +selectrum:project-search (query &optional all-files-p)
"Ex interface for `+selectrum/project-search'."
(interactive "<a><!>")
(+selectrum/project-search all-files-p query))
;;;###autoload (autoload '+selectrum:project-search-from-cwd "completion/ivy/autoload/evil" nil t)
(evil-define-command +selectrum:project-search-from-cwd (query &optional recurse-p)
"Ex interface for `+selectrum/project-search-from-cwd'."
(interactive "<a><!>")
(+selectrum/project-search-from-cwd (not recurse-p) query))

View file

@ -16,7 +16,9 @@
((featurep! :completion helm)
'(helm-map
helm-rg-map
helm-read-file-map))))
helm-read-file-map))
((featurep! :completion selectrum)
'(selectrum-minibuffer-map))))
"A list of all the keymaps used for the minibuffer.")

View file

@ -68,7 +68,10 @@
((featurep! :completion helm)
(evil-ex-define-cmd "pg[rep]" #'+helm:project-search)
(evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd)))
(evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd))
((featurep! :completion selectrum)
(evil-ex-define-cmd "pg[rep]" #'+selectrum:project-search)
(evil-ex-define-cmd "pg[grep]d" #'+selectrum:project-search-from-cwd)))
;;; Project tools
(evil-ex-define-cmd "com[pile]" #'+evil:compile)

View file

@ -42,10 +42,11 @@
mu4e-context-policy 'pick-first
;; compose with the current context, or ask
mu4e-compose-context-policy 'ask-if-none
;; use helm/ivy
;; use helm/ivy/selectrum
mu4e-completing-read-function
(cond ((featurep! :completion ivy) #'ivy-completing-read)
((featurep! :completion helm) #'completing-read)
(cond ((featurep! :completion ivy) #'ivy-completing-read)
((featurep! :completion helm) #'completing-read)
((featurep! :completion selectrum) #'completing-read)
(t #'ido-completing-read))
;; no need to ask
mu4e-confirm-quit nil

View file

@ -103,3 +103,9 @@ OR a shell command string such as
:when (featurep! :completion helm)
:commands helm-notmuch
:after notmuch)
(use-package! consult-notmuch
:when (featurep! :completion selectrum)
:commands consult-notmuch
:after notmuch)

View file

@ -8,3 +8,5 @@
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
(when (featurep! :completion helm)
(package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288"))
(when (featurep! :completion selectrum)
(package! consult-notmuch :pin "67cf219fcce211237347a783ce6982402341d5fd"))