nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.14k stars 466 forks source link

Bug: Highlights are incorrectly rendered when StatusLine highlight group is inverted #1312

Open Ontonator opened 4 days ago

Ontonator commented 4 days ago

Self Checks

How to reproduce the problem

  1. Use a version of Neovim ≥ commit e049c6e4c08a141c94218672e770f86f91c27a11
  2. Use a colorscheme in which StatusLine has reverse set

Expected behaviour

Colours look normal.

Actual behaviour

Colours are inverted (including double inverting of highlight groups that are already inverted). Section separators are incorrect, since they use the background colours (which are now the foreground colours) of the adjacent components and they are on the wrong side (since their own background and foreground colours are swapped).

Minimal config to reproduce the issue

call plug#begin("[redacted]/config/.local/share/nvim/plugged")
" Your plugins go here like
Plug 'nvim-lualine/lualine.nvim'

call plug#end()

" Your Viml part of config goes here
" colorscheme onedark
hi StatusLine gui=reverse

lua << END
-- Your lua part of config goes here
require'lualine'.setup {

}

END

" Instructions:
" -------------------------------------------------------------
" Load this config with nvim_isolated_conf.sh -l [redacted]/config
" Remember to run :PlugInstall after changing plugin section
" Also delete the comments before putting this file on issue
" That will reduce noise
" You can delete [redacted]/config once you're done

Additional information

https://github.com/neovim/neovim/commit/e049c6e4c08a141c94218672e770f86f91c27a11 made statustext etc. inherit styles from StatusLine etc.

daveyarwood commented 2 days ago

I've started experiencing this too, after updating Neovim recently.

Before updating:

2024-10-22-163832_1920x43_scrot

After updating:

2024-10-22-163853_1920x41_scrot

sozelfist commented 2 days ago

I also got the same problem as the one @daveyarwood has mentioned here after updating neovim.

Before updating: I don't have an image here

After updating: image

weskoerber commented 1 day ago

Related discussion: https://github.com/nvim-lualine/lualine.nvim/discussions/1309