You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BufferLineCycleNext/Prev only cycles between ungrouped buffers and open groups. Groups whose buffers are closed are not opened.
What did you expect to happen?
BufferLineCycleNext/Prev should cycle through adjacent buffers regardless of whether their group is open or closed. If cycling into a group that's closed, the group should open, and close automatically upon leaving the group if auto_close is set to true.
Config
I load bufferline with lazy and require the following module via the config parameter:
localkeymap=vim.keymap.setkeymap("n", "<leader>bp", "<cmd>BufferLineTogglePin<CR>", { noremap=true, silent=true, desc="[P]in buffer" })
keymap("n", "<leader>bh", "<cmd>BufferLineMovePrev<CR>", { noremap=true, silent=true, desc="Move buffer left" })
keymap("n", "<leader>bl", "<cmd>BufferLineMoveNext<CR>", { noremap=true, silent=true, desc="Move buffer right" })
keymap("n", "<S-h>", "<cmd>BufferLineCyclePrev<CR>", { noremap=true, silent=true, desc="Prev buffer" }) -- NOTE: doesn't seem to enter groupskeymap("n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { noremap=true, silent=true, desc="Next buffer" }) -- NOTE: doesn't seem to enter groupsreturnfunction()
localgroups=require("bufferline.groups").builtinrequire("bufferline").setup(
{
options= {
diagnostics="nvim_lsp",
diagnostics_indicator=function(count, level)
localicon=level:match("error") and" " or" "return"" ..icon..countend,
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= {
-- show pinned buffers first, then all ungrouped buffers, then docs then testsgroups.pinned:with({ icon=" " }),
groups.ungrouped,
{
name="Docs ",
highlight= { underline=true, sp="#FC6F03" },
auto_close=true,
matcher=function(buf)
localfilename=vim.api.nvim_buf_get_name(buf.id)
returnfilename:match("%.md") orfilename:match("%.txt")
end,
},
{
name="Tests ",
highlight= { underline=true, sp="#036FFC" },
auto_close=true,
-- icon = " ",matcher=function(buf)
localfilename=vim.api.nvim_buf_get_name(buf.id)
returnfilename:match("%test_")
end,
},
},
},
color_icons=true,
highlights= {
tab_selected= {
bg= {
attribute="fg",
highlight="Pmenu",
},
},
},
indicator= { style="underline" }, -- doesn't seem to be workingseparator_style= { "", "" },
},
}
)
end
Is there an existing issue for this?
What happened?
BufferLineCycleNext
/Prev
only cycles between ungrouped buffers and open groups. Groups whose buffers are closed are not opened.What did you expect to happen?
BufferLineCycleNext
/Prev
should cycle through adjacent buffers regardless of whether their group is open or closed. If cycling into a group that's closed, the group should open, and close automatically upon leaving the group ifauto_close
is set totrue
.Config
I load
bufferline
withlazy
andrequire
the following module via theconfig
parameter:Additional Information
...
commit
5cc447c
The text was updated successfully, but these errors were encountered: