kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

Not a bug but suggestion

Open yakomisar opened this issue 11 months ago • 3 comments

As I mentioned during the stream, a good way to improve user experience in managing buffers with Telescope is by adding the following code:

vim.keymap.set("n", "<leader><leader>", function() builtin.buffers({ sort_mru = true, ignore_current_buffer = true }) end, { desc = "List opened buffers" }) This code prevents the currently opened buffer from appearing in the list of buffers.

yakomisar avatar Feb 26 '24 18:02 yakomisar

hi there! Thank you for your contribution.

I am sincerely, unsure as to whether or not hiding the currently open buffer would be the obvious behavior I would expect as a new user. To be honest, when I ask for "a list of open buffers" I expect exactly that and not "a list of open buffers save for the one I'm currently working on".

feoh avatar Feb 26 '24 20:02 feoh

Ya, sort_mru might be nice either way tho.

tjdevries avatar Feb 26 '24 21:02 tjdevries

Got no issue with sort_mru :)

feoh avatar Feb 26 '24 22:02 feoh

By skipping the buffer you're already in, Telescope makes it quicker and simpler to jump to where you actually want to go. Think of it as clearing out the clutter from your path. This tweak means less scrolling, faster finding, and a smoother ride overall. It's all about making things feel just right—like the tool's reading your mind and knows you're not looking to switch to where you already are.

in addition it could potentially replace harpoon at first glance:)

anyway it's up to you

yakomisar avatar Feb 27 '24 09:02 yakomisar

In my view ignore_current_buffer will be confusing to newcomers.

dam9000 avatar Feb 27 '24 09:02 dam9000

thank you very much for your contribution but I don't think skipping the current buffer and telescope. Buffer list is a good fit at this time.

Please feel free to reopen if you want to just make the sort change but for now I'm closing this.

also, your change in no way, shape or form replaces harpoon :-)

feoh avatar Feb 27 '24 13:02 feoh