vim icon indicating copy to clipboard operation
vim copied to clipboard

WinBar highlight does not follow color scheme

Open fedorenchik opened this issue 3 years ago • 12 comments

What happened

WinBar hightight colors left as defaults.

What I expected to happen

WinBar highlight groups ToolbarLine and ToolbarButton set to colors matching dracula theme.

Screenshot

Screenshot from 2021-03-30 12-38-16

Machine Info

  • Vim type: gvim
  • Vim version: 8.2.2601
  • OS: Manjaro Gnome
  • Terminal/Terminal Emulator/VTE: Kitty
  • TERM environment variable: xterm-kitty

fedorenchik avatar Mar 30 '21 04:03 fedorenchik

Is this from a plugin? Where do the groups come from?

We can certainly add support for a plugin (?) or for something that's part of default vim; it's also possible to customize those colors yourself.

benknoble avatar Mar 30 '21 11:03 benknoble

This is part of default vim. WinBar can be added as:

nnoremenu WinBar.test :test

and works like menu.

fedorenchik avatar Mar 30 '21 13:03 fedorenchik

Apologies for the delay. I haven't given this much thought in terms of what colors are appropriate. Suggestions are welcome; perhaps @dsifford knows something about how we should style UI elements?

If you're keen on experimenting, :help dracula-customization makes a good starting point

benknoble avatar Apr 02 '21 14:04 benknoble

I'll be honest and say I've never heard of winbar or any of the nnoremenu commands so I'm not even sure where to start.

I tried entering @fedorenchik's example in a blank editor and nothing seemed to happen.

dsifford avatar Apr 05 '21 13:04 dsifford

@dsifford I think in non-gui vim you have to :runtime menu.vim, and then use :emenu <MenuName>.<item> to access the menu. In gvim, you have to not have M in guioptions. @fedorenchik are you using the toolbar also? On MacVim, the menu appears in the system's menu bar by default.

benknoble avatar Apr 05 '21 14:04 benknoble

Here's recording of how WinBars work: Peek 2021-04-05 22-35

fedorenchik avatar Apr 05 '21 14:04 fedorenchik

I use Linux GTK3 GUI, Vim 8.2.2601

fedorenchik avatar Apr 05 '21 14:04 fedorenchik

This also works in terminal, as long as terminal supports mouse.

fedorenchik avatar Apr 05 '21 14:04 fedorenchik

This is demonstration of WinBar in terminal vim clicking split button with mouse: Peek 2021-04-05 22-42

fedorenchik avatar Apr 05 '21 14:04 fedorenchik

As I said I don't have much thought on this, nor the time to dig in to it. If we don't have a suggestion for a generic UI element, than I would recommend @fedorenchik try some things and come back with a suggestion.

benknoble avatar Apr 07 '21 21:04 benknoble

@benknoble Sorry, I don't understand what you mean by 'generic UI element'? WinBar is similar to button toolbar, but can be attached to each window (and use "text" UI inside vim windows).

And what things you mean you recommend to try? If you mean real use case, there's vimspector (modern debugger for vim): https://github.com/puremourning/vimspector

Or you want me to send PR (should be pretty easy (add ToolbarLine and ToolbarButton highlights)) ?

fedorenchik avatar Apr 09 '21 06:04 fedorenchik

It's a button /shrug we have all kinds of spec for programming- and markdown- specific syntax items, but the UI stuff (line numbers, etc.) is a bit more ad-hoc.

Yes, I'm suggesting you try some different things from the colorscheme's palette for those buttons and send a PR (w/ screenshot).

benknoble avatar Apr 09 '21 12:04 benknoble