Visual highlighting of current window doesn't work
jrwrigh opened this issue · 4 comments
I'm on neovim v0.8.2 and, as the title says, the highlighting of the current window doesn't change when going into WinShift mode. Other setting are being implemented correctly (such as turning on/off line wrapping), but the highlighting is not. My config is default right now.
Running :hi WinShiftNormal
shows WinShiftNormal xxx cleared
. It looks like you simply toggle linking the "normal" highlight groups to WinShift*
highlight to get the effect. If that's true, I believe the result of :hi WinShiftNormal
should actually display some the visual highlight settings, but it currently doesn't. Any ideas as to why, or debugging?
Confirmed locally that rerunning :lua require('winshift.colors').setup()
correctly sets :hi WinShiftNormal
to WinShiftNormal xxx guibg=#3a444b
. After doing that, the visual highlighting of the active window is working correctly.
So something is clearing WinShift*
highlight groups for some reason...
Even adding require('winshift.colors').setup()
as the last command in my init.lua
still results in WinShiftNormal xxx cleared
.
Solved it:
The the colorscheme
command was being run after WinShift was setup. I'm guessing that's why it the highlight group was being cleared.
I run the colorscheme
command as apart of the setup for my color scheme plugin (sonokai), so in my case I needed to put after='sonokai'
in the plugin declaration:
use { 'sindrets/winshift.nvim', config = get_setup("winshift"), after='sonokai' }
Maybe we should add a statement in the Caveats section of the README that winshift setup should be done after running colorscheme
. I'll leave the issue open for right now as a reminder on whether to add that to the README.
I can't reproduce this. Please provide a minimal config that makes the issue reproducible. Here's a template.
The plugin subscribes to the ColorScheme
auto command event, so all the highlight groups should be redefined when you change your color scheme. As such, it shouldn't matter in which order you load your color scheme and this plugin.
Closing due to inactivity from OP.