bufferline.nvim
bufferline.nvim copied to clipboard
[Bug]: attempt to index field 'filename' (a nil value)
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
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","<leader>td",
function()
vim.cmd("bd")
end,
{desc = "[t]ab [d]elete"}),
-- vim.keymap.set("n","<leader>tg",
-- function()
-- vim.cmd("bd")
-- end,
-- {desc = "[t]ab [d]elete"})
},
}
Additional Information
...
commit
No response