kanagawa.nvim icon indicating copy to clipboard operation
kanagawa.nvim copied to clipboard

WinBar highlight group overwrite works randomly

Open boltlessengineer opened this issue 3 years ago • 5 comments

I found overriding WinBar highlighting group works randomly. Even I override WinBar to { bg = '#000000' }, WinBar hlgroup appears to be { fg = '#c8c093' } most cases.

How to reproduce:

  1. Create test.lua file (this would be minimal init.lua file)
vim.o.termguicolors = true
require('kanagawa').setup {
  overrides = {
    WinBar = { bg = '#000000' },
  }
}
vim.cmd('colorscheme kanagawa')

-- some keymaps for making test easy
vim.keymap.set('n', '<space>', function() vim.o.winbar = [[%f]] end)
vim.keymap.set('n', 'q', ':q<CR>')
  1. Run nvim with following command
nvim -u test.lua --no-plugin
nvim -u test.lua --no-plugin
nvim -u test.lua --no-plugin
...
  1. See WinBar highlight group overriding doesn't apply in most cases
image image

I checked both neovim v0.8.0 and v0.9.0, but result was same. Also, I'm pretty curious why this only happens for hlgroup WinBar. (StatusLine works fine)

boltlessengineer avatar Oct 23 '22 15:10 boltlessengineer

hmm I'm sorry but I can't reproduce. Do you have any plugins that interact with the winbar?

rebelot avatar Nov 23 '22 19:11 rebelot

sorry, I was indeed able to reproduce, like 1 out of 10 restarts does not apply the winbar override... I really wouldn't know how to debug this...

But you don't need to use override at all... I wonder if this could be reproduced with the following snippet

require'kanagawa'.setup({...})
vim.cmd("colorscheme kanagawa")
vim.cmd("hi WinBar guibg=gray")
vim.cmd("hi WinBarNC guibg=black")

rebelot avatar Nov 23 '22 19:11 rebelot

This solved the problem right away.

Lovely theme by the way. I really admire the dragon variant, I love the old terminal look that it provides, it makes it seem like I'm using Bram's old vim again, unlike the contemporary hipster garbage like catpucchin and a few others.

CoderLadFahim avatar Jan 17 '24 05:01 CoderLadFahim