akinsho / akinsho/bufferline.nvim

[Bug]: Tabline hidden by interaction with scope.nvim

Đang mở
#925 0 bình luận 2 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Lua
Star
4.4k
Fork
240
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Is there an existing issue for this?

- [X] I have searched the existing issues

### What happened?

While using scope.nvim for tab-scoped buffers and option `always_show_bufferline = false`, switching to a tab with one buffer hides the tabline.

### What did you expect to happen?

BufferLine to stay/appear due to multiple tabs existing.

### Config

LazyVim defaults + overrides.

LazyVim

```lua
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "bp", "BufferLineTogglePin", desc = "Toggle Pin" },
{ "bP", "BufferLineGroupClose ungrouped", desc = "Delete Non-Pinned Buffers" },
{ "bo", "BufferLineCloseOthers", desc = "Delete Other Buffers" },
{ "br", "BufferLineCloseRight", desc = "Delete Buffers to the Right" },
{ "bl", "BufferLineCloseLeft", desc = "Delete Buffers to the Left" },
{ "", "BufferLineCyclePrev", desc = "Prev Buffer" },
{ "", "BufferLineCycleNext", desc = "Next Buffer" },
{ "[b", "BufferLineCyclePrev", desc = "Prev Buffer" },
{ "]b", "BufferLineCycleNext", desc = "Next Buffer" },
{ "[B", "BufferLineMovePrev", desc = "Move buffer prev" },
{ "]B", "BufferLineMoveNext", desc = "Move buffer next" },
},
opts = {
options = {
-- stylua: ignore
close_command = function(n) LazyVim.ui.bufremove(n) end,
-- stylua: ignore
right_mouse_command = function(n) LazyVim.ui.bufremove(n) end,
diagnostics = "nvim_lsp",
always_show_bufferline = false,
diagnostics_indicator = function(_, _, diag)
local icons = require("lazyvim.config").icons.diagnostics
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
return vim.trim(ret)
end,
offsets = {
{
filetype = "neo-tree",
text = "Neo-tree",
highlight = "Directory",
text_align = "left",
},
},
---@param opts bufferline.IconFetcherOpts
get_element_icon = function(opts)
return LazyVim.config.icons.ft[opts.filetype]
end,
},
},
config = function(_, opts)
require("bufferline").setup(opts)
-- Fix bufferline when restoring a session
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
callback = function()
vim.schedule(function()
pcall(nvim_bufferline)
end)
end,
})
end,
}
```

Overrides

```lua
return {
"akinsho/bufferline.nvim",
dependencies = { { "tiagovla/scope.nvim", config = true } },
}
```

### Additional Information

Overriding with `always_show_bufferline = true` does not seem to prevent the problem.

### commit

99337f6 (v4.6.1)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.