rose-pine / neovim

Soho vibes for Neovim
MIT License
2.36k stars 151 forks source link

bug: incorrect separator color for lualine buffer #288

Closed kdheepak closed 4 months ago

kdheepak commented 4 months ago

Neovim version (nvim -v)

NVIM v0.11.0-dev-315+g46187117c Build type: RelWithDebInfo LuaJIT 2.1.1716656478 Run "nvim -V1 -v" for more info

Terminal / multiplexer

alacritty / zellij

Describe the bug

image

From repro.lua (test.lua):

$ nvim -u test.lua test.lua README.md aliases -c ":bnext"
image

Repro

vim.o.packpath = "/tmp/nvim/site"

local plugins = {
  rose_pine = "https://github.com/rose-pine/neovim",
  lualine = "https://github.com/nvim-lualine/lualine.nvim",
}

for name, url in pairs(plugins) do
  local install_path = "/tmp/nvim/site/pack/test/start/" .. name
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system({ "git", "clone", "--depth=1", url, install_path })
  end
end

require("rose-pine").setup({
  styles = {
    bold = true,
    italic = false,
    transparency = true,
  },
  highlight_groups = {
    Comment = { italic = true },
  },
})

require("lualine").setup({
  options = {
    icons_enabled = true,
  },
  sections = {
    lualine_a = { "mode" },
    lualine_b = { "branch", "diff", "diagnostics" },
    lualine_c = { { "filename", path = 1 } },
    lualine_x = { "encoding", "fileformat", "filetype" },
    lualine_y = { "progress" },
    lualine_z = { "location" },
  },
  inactive_sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = { { "filename", path = 1 } },
    lualine_x = { "location" },
    lualine_y = {},
    lualine_z = {},
  },
  tabline = {
    lualine_a = { { "buffers", show_filename_only = false } },
    lualine_x = {},
    lualine_y = {},
    lualine_z = { "tabs" },
  },
  extensions = {},
})

vim.cmd("colorscheme rose-pine")
sjclayton commented 4 months ago

@kdheepak

Couple quick questions...

1) Have you tried another colorscheme such as say Catppuccin? If so, does it also exhibit the same behavior in the tabline in lualine? ie. the tab that is inactive is getting that white separator character.

2) Does this only happen if you are on say the middle buffer out of 3, or like 2 out of 5? or does it happen on every single buffer no matter which is selected?

Because there is nothing in the way rose-pine configures the highlights for lualine that I can immediately see that would cause this to happen.

If you can provide a bit more information, it would greatly help in triaging this issue. Thanks! 😄

kdheepak commented 4 months ago

The issue doesn't occur with other colorschemes:

image

I narrowed the issue down to transparency:

require("rose-pine").setup({
  styles = {
    transparency = false, -- no issue
    -- transparency = true, -- issue occurs
  },
})
image

I'm not sure if that's an issue with lualine or this repo though

sjclayton commented 4 months ago

@kdheepak

Alrighty, I will look into it more later today when I get some time.

mvllow commented 4 months ago

I think #301 should fix this

kdheepak commented 4 months ago

I tested it out and it fixes it for me! Thanks for the responsive changes!