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

feat: support for passing highlight group names #130

Merged
merged 2 commits into from
Jun 30, 2023
Merged

feat: support for passing highlight group names #130

merged 2 commits into from
Jun 30, 2023

Conversation

nenikitov
Copy link
Contributor

Hello,

I added an option to pass highlight group names to components for better color scheme support. For example:

{
    text = function(buffer)
        return buffer.unique_prefix
    end,
    highlight = 'Comment'
},

Similarly to other options, highlight accepts both string with the highlight group name and function(buffer) -> string.

When highlight is passed, fg, bg, and style parameters are ignored.

Copy link
Owner

@willothy willothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Thanks for the contribution :)

@willothy willothy merged commit 4463ba2 into willothy:main Jun 30, 2023
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