akinsho / akinsho/bufferline.nvim

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

Aperta
#961 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
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?

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_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.