akinsho / akinsho/bufferline.nvim
[Bug]: LSP server add some weird background color to the existing tabs.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 240
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 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 ✅.

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

### 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_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.