akinsho / akinsho/bufferline.nvim

[Bug]: attempt to index field 'filename' (a nil value)

Abierto
#961 2 comentarios 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?

Documentation for grouping is outdated.

### What did you expect to happen?

expected the code snippet to give tab grouping, instead get a warning that filename isn't used anymore and should use id.

### Config

```lua
return {
-- using lazy.nvim
{
'akinsho/bufferline.nvim',
lazy = false,
version = '*',
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
bufferline = require 'bufferline'
bufferline.setup {
options = {
mode = 'buffers',
style_preset = bufferline.style_preset.sloped,
separator_style = 'slant',
themable = true,
groups = {
options = {
toggle_hidden_on_enter = true -- when you re-enter a hidden group this options re-opens that group so the buffer is visible
},
items = {
{
name = "Godot", -- Mandatory
highlight = {underline = true, sp = "blue"}, -- Optional
priority = 2, -- determines where it will appear relative to other groups (Optional)
icon = "", -- Optional
matcher = function(buf) -- Mandatory
return buf.id.name:match('%.cs') or buf.id.name:match('%.gdscript')
end,
},
{
name = "Neovim",
highlight = {undercurl = true, sp = "green"},
auto_close = false, -- whether or not close this group if it doesn't contain the current buffer
priority = 1,
icon = "",
matcher = function(buf)
return buf.id:match('%.lua') or buf.id:match('%.vim')
end,
separator = { -- Optional
style = require('bufferline.groups').separator.tab
},
}
}
}

},
}
end,
vim.keymap.set("n","td",
function()
vim.cmd("bd")
end,
{desc = "[t]ab [d]elete"}),
-- vim.keymap.set("n","tg",
-- function()
-- vim.cmd("bd")
-- end,
-- {desc = "[t]ab [d]elete"})
},
}
```

### Additional Information

...

### 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.