minad / consult

:mag: consult.el - Consulting completing-read
GNU General Public License v3.0
1.12k stars 98 forks source link

[FR] Add the ability to change the initial query in `consult-completion-in-region` #954

Closed NightMachinery closed 2 months ago

NightMachinery commented 2 months ago

I like to add a space to my completion queries, as I use orderless. Looking at the code, the line I think the line :initial initial should be changed to:

:initial (consult--completion-transform-initial initial)

with consult--completion-transform-initial being set to the identity function by default.

oantolin commented 2 months ago

Huh, this is an interesting idea. I also use orderless and consult-completion-in-region and I don't always start by typing SPC, but it's true that I frequently do. Maybe I'd like it better if a space were always added and I sometimes deleted it. I think I'd need to try that for a while to know if it suited me better, but it's definitely a reasonable idea.