completion-boundaries support · Issue #448 · radian-software/selectrum (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
clemera opened this issue
Feb 18, 2021
· 0 comments
Open
completion-boundaries support #448
clemera opened this issue
Feb 18, 2021
· 0 comments
Comments
I tried your checko example from above again and it would actually nice if there would be some limited support for completion boundaries in Selectrum.
(defun grep-test (string pred action) (if (eq (car-safe action) 'boundaries) (cons 'boundaries (cons (if-let (pos (seq-position string ?#)) (1+ pos) (length string)) 0)) (complete-with-action action '(alpha beta gamma) "" pred)))
If you enter
grep#filter
, then "grep" is ignored by completion and "filter" is used for completion. This allows also to TAB cycle through the results in default completion which is an improvement over the status quo in consult-grep.
minad added a commit to minad/consult that referenced this issue
We may want to use the boundaries feature at some point for improved completion
when the async filtering is used. In that case the input string is split in two
parts #grep#filter
. We could return boundaries such that the completion
filtering only takes the filter
into account. Given that, we would not need
our custom async-split completion style. This would then allow TAB cycling
candidates for example. Unfortunately Selectrum does not yet have sufficient
support for boundaries (radian-software/selectrum#448).
1 participant