Bekaboo / dropbar.nvim

IDE-like breadcrumbs, out of the box
GNU General Public License v3.0
1.05k stars 24 forks source link

[Feature]: Add color to kind's text, not just icon #18

Closed nullchilly closed 1 year ago

nullchilly commented 1 year ago

Problem

Currently the winbar fg rely on the WinBar highlight group

image

This makes it hard to add dropbar.nvim integration to colorscheme. If I change the WinBar highlight to make dropbar prettier, vanilla user will not be happy.

Expected behavior

Add DropBarNormal = { link = "WinBar", default = true } so colorscheme can add dropbar integration easier:

image

Add color_mode to show color for kind's text and not just its color, via DropBarKindFunction highlight group instead of just for icon (DropBarIconKindFunction)

image

Bekaboo commented 1 year ago

This is a good idea, but I hesitate to implement this since currently the text color depends on not only hl-WinBar but also hl-WinBarNC, which make it possible to highlight texts in winbars of non-current windows in a different colors.

If I set the highlights groups explicitly and link it to hl-WinBar by default, we will no longer respect hl-WinBarNC.

Any thoughts?

nullchilly commented 1 year ago

I guess we can make DropBarNormal an empty highlight group by default

:lua vim.o.winbar = "%#DropBarNormal# dropbar.lua"

image

WinBarNC still works. Now if you define the highlight group:

:hi DropBarNormal guifg=#cba6f7

image

Bekaboo commented 1 year ago

Looks good will look into it later.

nullchilly commented 1 year ago

@Bekaboo Special thanks :)

I implemented it in https://github.com/catppuccin/nvim/pull/499

Before

image

After

color_mode = false

image

color_mode = true

image

Bekaboo commented 1 year ago

👍🏼 Good job! I'm always impressed by how configurable and aesthetic catppuccin is.