3 ms·
I recently switched from ivy to selectrum as well. I miss some stuff like ivy-rich, but I found integration with prescient.el[1] more important than an eye cand
by sirn 6y ago
I recently switched from ivy to selectrum as well. I miss some stuff like ivy-rich, but I found integration with prescient.el[1] more important than an eye candy (where ivy-prescient breaks every few version). I still haven't got a chance to rewrite ivy-ag with selectrum^note1, but it has been working great so far.
My only issue with selectrum was, back when I'm using ivy, I rebind forward direction keys (<right>/C-l/C-f) to `ivy-partial-or-done` which either complete the input with the selection or visit a file depending on the context. Selectrum doesn't have equivalent implementation, but it's easy enough to implement. Reposting in here in case anybody needs it:
(defun gemacs--selectrum-insert-or-submit-current-candidate ()
"Insert current candidate or forward to `selectrum-select-current-candidate'
if input text hasn't changed since last completion."
(interactive)
(let ((prev-input (selectrum-get-current-input)))
(when (> (length (selectrum-get-current-candidates)) 0)
(selectrum-insert-current-candidate))
(when (string= prev-input (selectrum-get-current-input))
(selectrum-select-current-candidate))))
[1]: https://github.com/raxod502/prescient.el https://github.com/raxod502/prescient.el
^note1: I don't use rg due to dependency on PCRE2 which doesn't play nice on my OpenBSD machine.
- Nullabillity 6y ago> ^note1: I don't use rg due to dependency on PCRE2 which doesn't play nice on my OpenBSD machine. FWIW, PCRE2 seems to be an optional dependency, and disabled by default (unless you build it with `--feature pcre2`).
- sirn 6y agoThe last time I tried rg with pcre2 disabled (OpenBSD 6.4?), it SEGFAULT even with wxallowed :(
- Nullabillity 6y agoLooks like either things have changed, or this only happens under some specific circumstances. I just tried installing it into a clean OpenBSD 6.7 VM, and it ran fine out of the box: # pkg_add rust # cargo install ripgrep # echo hi > asdf # .cargo/bin/rg hi asdf 1:hi
- sirn 6y agoOh, that is nice. Thank you for testing!