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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Swiper minibuffer highlighting #1551
Conversation
It is actually not suboptimal, but rather entirely wrong - the improved substring highlighting in the After screenshot is only applied the first time around; any repeated invocation of |
Coincidentally, I started trying to fix regex-ignore-order highlighting in swiper recently. I was looking at the buffer highlighting first instead of the minibuffer highlighting. For highlighting, swiper seems to only support regex builders that return a single regex. In particular Edit: just saw your comment in #1550 (comment) Should I pause my effort and see what happens with this PR, or do you think they are unrelated? I'd like to contribute to making regex-ignore-order a first class regex option. I've noticed some other worrisome things like ignore-order does not make use of |
I opened this PR because I thought I had stumbled across a quick fix to minibuffer highlighting at least, but I was wrong. I'm not actually familiar with how everything interoperates and I don't currently have much free time, so please don't pause your efforts because of me.
As a fellow user, I look forward to seeing the fruit of your efforts. Thanks for working on this. |
Same from me. I would love to get this fixed, but I don't have much free time in the coming week or two. |
ivy-highlight-functions-alist does (and probably should) not include an entry for swiper--re-builder, so highlighting always falls back to ivy--highlight-default, even when ivy--regex-function is set to, say, ivy--regex-ignore-order. Temporarily updating ivy-highlight-functions-alist to include an entry for swiper--re-builder is one suboptimal way to adapt highlighting accordingly. Re: abo-abo#1550
Seeing as I won't be working on this again in the immediately foreseeable future, should I close this PR, or would you rather it be kept open as a reminder? |
If you are done with it, please close it. |
Fixes abo-abo#654. Fixes abo-abo#1550. Supersedes abo-abo#1551.
Commentary
ivy-highlight-functions-alist
does (and probably should) not include an entry forswiper--re-builder
, so highlighting always falls back toivy--highlight-default
, even whenivy--regex-function
is set to, say,ivy--regex-ignore-order
.Temporarily updating
ivy-highlight-functions-alist
to include an entry forswiper--re-builder
is one suboptimal way to adapt highlighting accordingly. @abo-abo Can you think of a better way to achieve this, short of redesigning the whole regexp-builder/highlight-function system?Re: #1550
Example
make plain
swiper.el
RETswiper isearch with an overview
Before
After