akinsho / akinsho/bufferline.nvim

[Bug]: LSP server add some weird background color to the existing tabs.

Abierto
#1,024 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Lua
Estrellas
4.4k
Forks
240
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

When LSP is disabled, the tab looks as configured ✅.

![Image](https://github.com/user-attachments/assets/9b140a1a-13af-407b-adb3-f73fa747b0a6)

When LSPStart jdtls, the tab looks like something awkward 😔. Even after removing the diagnostics count here. still the same.

![Image](https://github.com/user-attachments/assets/1993c899-8952-4831-941e-338cc74fd954)

### What did you expect to happen?

LSP server should not affect bufferline rendering.

### Config

```lua
return {
"akinsho/bufferline.nvim",
event = "BufReadPost",
config = function()
local bufferline = require("bufferline")
local inactive_bg = "#1c1c1c"
local inactive_fg = "#e0e0e0"
local visible_bg = "#0e0e0e"
local visible_fg = "#5c6370"
local selected_bg = "#282c34"
local selected_fg = "#00afff"
local background = "#1c1c1c"
local inactive_set = { fg = inactive_fg, bg = inactive_bg }
local visible_set = { fg = visible_fg, bg = visible_bg }
local active_set = { fg = selected_fg, bg = selected_bg }
bufferline.setup({
highlights = {
background = inactive_set,
buffer_visible = visible_set,
buffer_selected = active_set,

numbers = inactive_set,
numbers_visible = visible_set,
numbers_selected = active_set,

close_button = inactive_set,
close_button_visible = visible_set,
close_button_selected = active_set,

offset_separator = { fg = "#585858", bg = selected_bg },

separator = { fg = background, bg = inactive_bg },
separator_visible = { fg = background, bg = visible_bg },
separator_selected = { fg = background, bg = selected_bg },

modified = { fg = "#ff0000", bg = inactive_bg },
modified_visible = { fg = "#ff0000", bg = visible_bg },
modified_selected = { fg = "#ff0000", bg = selected_bg },
fill = { bg = background },
},
options = {
mode = "buffers", -- set to "tabs" to only show tabpages instead
style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
numbers = "both", -- "none" | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
diagnostics = "nvim_lsp",
diagnostics_update_on_event = true, -- use nvim's diagnostic handler
diagnostics_indicator = function(count)
return "(" .. count .. ")"
end,
color_icons = true,
separator_style = "slant", -- "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
always_show_bufferline = true,
indicator = {
icon = "▎", -- this should be omitted if indicator style is not 'icon'
style = "icon", --"icon" | "underline" | "none",
},
offsets = {
{
filetype = "NvimTree",
text = "",
highlight = "Directory",
separator = true, -- use a "true" to enable the default, or set your own character
},
},
},
})
end,
}
```

### Additional Information
comment out these lines will fix the rendering. but I do want to have the diagnostic count in the tab.
```lua
-- diagnostics = "nvim_lsp",
-- diagnostics_update_on_event = true, -- use nvim's diagnostic handler
-- diagnostics_indicator = function(count)
-- return "(" .. count .. ")"
-- end,
```
...

### commit

_No response_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.