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

Add option to not "hide" the colon when 'keyword' highlight is "wide" #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KLimit
Copy link

@KLimit KLimit commented May 6, 2023

I find it helpful to be able to see the colon after any keywords (though the default wide_bg does look nice). Found out that when the highlighter is configured with a wide-background keyword and foreground after, the colon will have its background and foreground set to the same color.

It's still the default to hide the colon in the above manner. To make it visible, I added a boolean option to config.highlight called colon_in_wide. Please change the naming if you have something that's clearer; I think colon_in_wide is a little clunky.

Here's how the options interact (no effect if "keyword" and "after" are both fg or bg):

keyword after colon_in_wide result
wide_bg fg false image
wide_bg fg true image
wide_fg bg false image
wide_fg bg true image

@LunarLambda
Copy link
Contributor

This can be fixed by my PR #255.

With it you can set

{
    highlight = {
        keyword = 'bg',
        pattern = [[.{-}<(\s?(KEYWORDS):)]],
    }
}

grafik

Copy link
Contributor

github-actions bot commented Jul 6, 2024

This PR is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants