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

[Feature]: Highlight group for menu #16

Closed
schizophrenical opened this issue Jun 1, 2023 · 8 comments
Closed

[Feature]: Highlight group for menu #16

schizophrenical opened this issue Jun 1, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@schizophrenical
Copy link

Problem

As I understand it, dropbar follow the WinBar highlight group so changing the colors for WinBar will also reflect in dropbar.

This is working well as show below:
Screenshot_2023-06-01-20-48-02_3440x1440

Note that, I have a slightly different foreground color in WinBar compared to Normal.

However, for the menu items, it would be a 'nice-to-have' addition if the menu items also follows the WinBar highlights groups.

Below is a capture of the menu items:
Screenshot_2023-06-01-20-48-20_3440x1440

To further demonstrate, I have temporarily changed WinBar and WinBarNC to red and clicked on the winbar to reveal the menu items:
Screenshot_2023-06-01-20-58-52_3440x1440

Expected behavior

It would be a 'nice-to-have' if we have a highlight group for the menu items buffer. OR;
Make the menu items buffer follow WinBar highlight group for consistency.

@akinsho
Copy link

akinsho commented Jun 20, 2023

I was doing some digging around, to find a highlight group to change the background of the actual menu windows themselves. I thought DropBarMenuNormalFloat would change the background of the whole window but seems to only change each particular element. By default the NormalFloat usually applies to the entire float.

Is there a way to change the highlight for the entire window itself?

@Bekaboo
Copy link
Owner

Bekaboo commented Jun 20, 2023

@akinsho For text highlights inside menus, hl-DropbarMenuNormalFloat is dropped in favour of hl-DropbarKind*, see #18

@akinsho
Copy link

akinsho commented Jun 20, 2023

Hi @Bekaboo,

I was thinking more the entire window itself i.e. if you wanted to change the colour of an entire floating window. Not just parts of the text

@Bekaboo
Copy link
Owner

Bekaboo commented Jun 20, 2023

@akinsho

the colour of an entire floating window

Do you mean the background color of the menu? Currently no special highlight groups are set for that, but I think it can be done using 'winhl' if one wants to remap the background highlights.

@akinsho
Copy link

akinsho commented Jun 20, 2023

@Bekaboo yep I mean the background colour of the menu, essentially the same way you can tweak the background of cmp, telescope, lazy etc. just the standard NormalFloat winhighlight for the opened windows. Some plugins offer config via the winhl others map the winhighlight to plugin specific variants e.g. vim.wo.winhlight:append({ NormalFloat = 'DropbarCustomBg' }) I was essentially trying to figure out if that already existed as a highlight group. As you say it can be done through the winhl but is there an option for this somewhere? The docs/README don't mention winhl

@Bekaboo
Copy link
Owner

Bekaboo commented Jun 20, 2023

@akinsho Currently there's no option for it, will add it later.

@Bekaboo
Copy link
Owner

Bekaboo commented Jun 20, 2023

@akinsho Added hl-DropBarMenuNormalFloat and hl-DropBarMenuFloatBorder.

@Bekaboo Bekaboo closed this as completed Jun 20, 2023
@akinsho
Copy link

akinsho commented Jun 21, 2023

Awesome works great thanks 🙌🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants