AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 214 forks source link

fix(bufferline-nvim): add bufferline cycle bindings #1009

Closed acarl005 closed 1 month ago

acarl005 commented 1 month ago

Map [b and ]b to the bufferline-specific calls for cycling buffers.

📑 Description

I included astrocommunity.bars-and-lines.bufferline-nvim and observed the ]b and [b bindings not behaving correctly. They were switching buffers, but out-of-order w.r.t. how they were displayed in bufferline. This PR remaps those to call bufferline's specific API for cycling through tabs. With this custom binding added, I now observe the correct behavior.

ℹ Additional Information

It's not super straightforward to repro. Sometimes, I open a project, open various buffers, and press ]b and the ordering is correct. Other times, after opening some buffers, say with gd or from telescope searches, the buffer navigation starts happening out of order.

github-actions[bot] commented 1 month ago

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

mehalter commented 1 month ago

I built on this a bit more here: https://github.com/AstroNvim/astrocommunity/commit/3ec07095a7d14f8fa9477fdbc00010d9cdbf49c4

acarl005 commented 1 month ago

Thanks y'all :)