Skip to content
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

How to highlight the 'rest' of ivy-current-match #2394

Open
tam5 opened this issue Dec 31, 2019 · 2 comments
Open

How to highlight the 'rest' of ivy-current-match #2394

tam5 opened this issue Dec 31, 2019 · 2 comments
Labels

Comments

@tam5
Copy link

tam5 commented Dec 31, 2019

First, here is an example of what I'm trying to replicate:

Screen Shot 2019-12-31 at 10 49 08 AM

As in the above screenshot, in addition to the matched portions getting highlighted, the match under the cursor takes on a different foreground color. I am able to set the foreground for the entire match under the cursor, but then I lose the matched portion highlighting.

Any idaes?

@abo-abo
Copy link
Owner

abo-abo commented Jan 5, 2020

Here's how it looks like in my config:

swiper-2394-1

This seems to be what you want. The current match foreground is set by ivy-current-match.

@tam5
Copy link
Author

tam5 commented Jan 5, 2020

@abo-abo thanks for the response.

It seems to me that ivy-current-match affects the entire line of the current match. Actually what I am looking to do, is to highlight the entire line of the first match, foreground and background, and then add an additional color to the "matching regex" portion.

To use your example, if your cursor is on the FETCH_HEAD match, the background is blue, the foreground is white, but the HE instead of having the same white foreground, would have some other color instead.

The motivation can be seen by the original screenshot I posted, where the current match is given increased focus, and the currently typed matching section is also given focus.

My guess is maybe the matching portion needs to be given an additional face before the current match face? I can look into a PR if you would be willing to accept one, should this not actually already be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants