leath-dub / snipe.nvim

Efficient targetted menu built for fast buffer navigation
226 stars 13 forks source link

Feature request: Only shot last x used buffers #24

Closed oysandvik94 closed 1 week ago

oysandvik94 commented 2 months ago

I dont really close buffers, so I can end up with a huge list.

I usually use a global mark for buffers I want to navigate to frequently, so this plugin is useful for me when I want to navigate to a buffer that I had recently accessed but not tagged. So for that reason it would be nice if I was able to limit the menu to only show the top x last used buffers, specified in the config.

If this is a feature that is aligned with your goals of the plugin I would love to create a PR!

leath-dub commented 2 months ago

I plan to refactor most of the code currently so this is why I am avoiding adding much features into the core right now ( I will have to maintain them then ). I am quite busy right now so I haven't had the time. What would be really helpful as a PR is to add a contrib/ submodule so like lua/snipe/contrib/ where we can put different producers people write.

oysandvik94 commented 2 months ago

Understandable! I can maybe take a look at some point.

leath-dub commented 1 week ago

I think this will be possible in the new version just through the configuration. You can set the "max_height" to "x" (last x buffers) and change sort to be "last".

leath-dub commented 1 week ago

I think you can use the following config to only show the last 10 buffers by usage:

{ ui = { max_height = 10 }, sort = "last" }

Edit: This is on the new snipe2 branch.