Skip to content

feat: support for passing highlight group names#130

Merged
willothy merged 2 commits into
willothy:mainfrom
nenikitov:main
Jun 30, 2023
Merged

feat: support for passing highlight group names#130
willothy merged 2 commits into
willothy:mainfrom
nenikitov:main

Conversation

@nenikitov

Copy link
Copy Markdown
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.

@willothy willothy left a comment

Copy link
Copy Markdown
Owner

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