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

fix: virtual cursor hl overwhelme by search hl #72

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

henry-hsieh
Copy link

Currently, hop uses combine hl mode on virtual text. If the search highlight is bright color, the virtual text became hard to recognize. The fix change the hl mode to replace.

Another option is to dim the search highlight together with original text.

Before hop:
圖片
After hop origin:
圖片
After hop fix:
圖片

@smoka7
Copy link
Owner

smoka7 commented Apr 24, 2024

I like the current behavior better, however let's keep this open for other users to weigh in on the decision.

@henry-hsieh
Copy link
Author

Highlights are subjective. I can make it becomes a hop option. Users can configure it based on their needs.

@smoka7
Copy link
Owner

smoka7 commented Apr 25, 2024

Have you tried changing extmark priority? I don't have access to nvim for checking it right now.

@henry-hsieh
Copy link
Author

I think it has nothing to do with priority. Because hop doesn't specify the background colors on highlights for extmarks. By using combine method, it will preserve any background colors of users' colorscheme based on highlights of texts.

I'm okay with search highlight being dimmed by hop. That would be the most optimal looking by users. For example, apply a light gray color to search highlight in hint state, and recover after leaving hint state.

@smoka7
Copy link
Owner

smoka7 commented Apr 25, 2024

In that case let's make ‘hl_mode‘ configurable.

@henry-hsieh
Copy link
Author

OK! I have updated the new commit with hl_mode option.

@smoka7 smoka7 merged commit 6ff2350 into smoka7:master Apr 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants