Open wojciech-kulik opened 3 days ago
But why would need to do that? It seems like you want to manully sort (move around) the resilts list.
I cant imagine a usecase where you want to do that
I use Telescope in my plugin to present to the user a list of his devices with the ability to reorder the list and delete some devices - basically to manage the list.
Yeah but is telescope the correct solution for your problem or wouldnt it be better to build a ui yourself? Because we are primarly a fuzzy finder over lists and i dont see us implementing bindings or actions to manipulate the entymanager
The same question could be asked for any other integration, Telescope has been used for many creative things :). Fuzzy finder is helpful to search devices, that's why I use it. Also, I use it for many other things, so it makes sense to keep my plugin consistent.
I understand that it might be out of the scope of Telescope to support it. I'm just asking if there is any better way to achieve that in Telescope, but based on your answers I assume there isn't. So the only remaining question is why set_selection
doesn't work after refresh
function and is it an expected behavior? (btw. I worked around it in my plugin by adding a small delay)
Description
(I tried reaching out on Gitter first, but it seems like it's abandoned)
I need to add shortcuts to move telescope results up & down. However, I'm struggling with glitches, because replacing results moves the selection to the top, so the list jumps back & forth. Setting selected item without a small delay doesn't work. :( Is there any other solution?
Neovim version
Operating system and version
macOS 15.1
Telescope version / branch / rev
main
checkhealth telescope
Steps to reproduce
Expected behavior
The shortcut should move the item up without scrolling and jumping to the top.
Actual behavior
It seems like
set_selection
doesn't work directly afterrefresh
. Is there any other way to move up & down selected entry without glitches and with keeping the selection on the moved entry?Minimal config