nvim-lualine / lualine.nvim

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

Bug: Colors don't seem to work #832

Open GoodBoyNeon opened 1 year ago

GoodBoyNeon commented 1 year ago

Self Checks

How to reproduce the problem

use neovim v0.5.1 open windows terminal put the following configuration:

require('lualine').setup {
  options = { theme = 'horizon' }
}

Expected behaviour

image

Actual behaviour

image

Minimal config to reproduce the issue

require('lualine').setup {
  options = { theme = 'horizon' }
}

Aditional information

norseghost commented 1 year ago

I've had the exact same issue with lualine + nord.nvim for the better part of this year. No indication as to what causes it either.

to be precise: lualine sets the statusline sections correctlyy, but does not enabe highlight groups.,

re-running the setup function sets the highlight groups correctly., ,until next restart of neovim.

shadmansaleh commented 1 year ago

duplicate: there are way too many duplicates of this issue.

to be precise: lualine sets the statusline sections correctlyy, but does not enabe highlight groups.,

It enables highlight groups but your colorscheme removes them and doesn't even emit conventional event so other plugins get notified and syncronize.

Basically here you need to make sure your colorscheme gets loaded and applied before you call lualines setup not the other way around.

norseghost commented 1 year ago

Basically here you need to make sure your colorscheme gets loaded and applied before you call lualines setup not the other way around

Any ideas why things are still messed up when I do (and always have) define the color scheme before lualine in my packer setup? Packer compilation moving things around?

yavorski commented 1 year ago

You can try with packer after hook setup

use {
  "nvim-lualine/lualine.nvim", -- statusline plugin
  after = "zephyr-nvim", -- init after color scheme in order to prevent any overrides
  ...
}