Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 30, 2024
Merged

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

merged 1 commit into from
May 30, 2024

Conversation

acarl005
Copy link
Contributor

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.

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

github-actions bot commented May 29, 2024

Review Checklist

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

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Proper usage of opts table rather than setting things up with the config function.

Copy link
Member

@Uzaaft Uzaaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a readme note about the keybinding since you're overriding the default

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mehalter mehalter merged commit f34cd1c into AstroNvim:main May 30, 2024
24 of 25 checks passed
@mehalter
Copy link
Member

mehalter commented May 30, 2024

I built on this a bit more here: 3ec0709

@acarl005 acarl005 deleted the dev-bufferline-cycle-bindings branch May 30, 2024 16:00
@acarl005
Copy link
Contributor Author

Thanks y'all :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants