nvim-lualine / lualine.nvim

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

Bug: Icons show white separator #1225

Open SebasF1349 opened 2 months ago

SebasF1349 commented 2 months ago

Self Checks

How to reproduce the problem

Only a component with an icon in an inactive lualine/winbar is needed. My theme is Catppuccin with minimal config too.

Expected behaviour

Separators should be transparent with a transparent theme/background.

Actual behaviour

wezterm-gui_2rubnyp0RN

This wasn't happening before, but I can't point when it started happening. As you can see, the separator is not transparent. It only happens if the last component is an icon, if it's text the separator isn't shown. And it only happens in the inactive window, active windows shows as expected (transparent if needed).

Minimal config to reproduce the issue

return {
  "nvim-lualine/lualine.nvim",
  event = { "BufReadPre", "BufNewFile" },
  dependencies = { "nvim-tree/nvim-web-devicons" },
  opts = {
    options = {
      icons_enabled = true,
      component_separators = { left = "", right = "" },
      section_separators = { left = "", right = "" },
      disabled_filetypes = {
        statusline = {},
        winbar = {},
      },
      ignore_focus = {},
      globalstatus = true,
    },
    sections = {
      lualine_a = { "mode" },
      lualine_b = {},
      lualine_c = {},
      lualine_x = {},
      lualine_y = {},
      lualine_z = {},
    },
    inactive_sections = {},
    tabline = {},
    winbar = {
      lualine_a = {},
      lualine_b = {},
      lualine_c = {},
      lualine_x = {},
      lualine_y = { { "filetype", icon_only = true } },
      lualine_z = { { "filename", path = 1 } },
    },
    inactive_winbar = {
      lualine_a = {},
      lualine_b = {},
      lualine_c = {},
      lualine_x = {},
      lualine_y = { { "filetype", icon_only = true } },
      lualine_z = { { "filename", path = 1 } },
    },
  },
}

Additional information

miversen33 commented 1 month ago

I am seeing the same behavior but its only temporary on my system. In my specific case the separator between a static item (such as file name) and a conditional item (such as diagnostics) will cause this white separator to appear while the conditional item is loading. I also see this when I have git-blame enabled since that is also conditional. It seems like there was a change to how conditional logic is used to determine what separator to display?

5huanghuai commented 2 weeks ago

I also encountered the same problem. The background of the separator and the icons were both white, which was very ugly. The only thing I can solve now is to change the theme of nvim.

dkarter commented 3 days ago

Same here. It happens when I open a file directly (nvim somefile.yml), but seems to be fine if I open it from the fuzzy finder:

https://github.com/nvim-lualine/lualine.nvim/assets/551858/3cb55e32-8e1b-4f9e-ab1c-a00f8fb02d96

dkarter commented 3 days ago

I think this might be related to some changes in TokyoNight theme (at least my issues were). https://github.com/folke/tokyonight.nvim/issues/551

I was able to resolve it by configuring the theme explicitly on lualine:

  lualine.setup {
    -- ...
    options = {
      theme = 'tokyonight-moon',
    },
    -- ...
  }