Skip to content

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

@github-actions
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 This issue or PR has been inactive for a while label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue or PR has been inactive for a while

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants