akinsho / akinsho/bufferline.nvim

[Bug]: FIx for LazyVim users who can't open mutltiple bufers

Abierto
#899 2 comentarios 1 reacción 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?

since the last update of bufferline lazyvim users can't open multiple bufferse , heres the fix

### What did you expect to happen?

it should work flawlessly

### Config

updated the plugin to latest vaersion

### Additional Information

create a new file in you nvim/lua/plugins folder

``` lua

{
"Theyashsawarkar/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" },
},
opts = {
options = {
-- stylua: ignore
close_command = function(n) require("mini.bufremove").delete(n, false) end,
-- stylua: ignore
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) 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",
},
},
},
},
config = function(_, opts)
require("bufferline").setup(opts)
-- Fix bufferline when restoring a session
vim.api.nvim_create_autocmd("BufAdd", {
callback = function()
vim.schedule(function()
pcall(nvim_bufferline)
end)
end,
})
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.