telescope.nvim
telescope.nvim copied to clipboard
feat: goto next/previous entry from last picker
40 mins of a bit of telescope hacking :)
Closes #1701
Now you can
local actions = require "telescope.actions"
-- also works for actions.move_selection_previous
local select_next = actions.move_selection_next + actions.select_default
-- .. launch picker
select_next() -- go to next result of last picker
e: goes without saying but this is ulow prio :sweat_smile:
Is there a status update on this? Seems it's been stale for a while.
I'd be very happy for somebody to take this over assuming @Conni2461 signs off on this being a feature we should incorporate into telescope-core.
It's something users requested here and there and but you can also make the argument we are reinventing the quickfix list here.
I'd be very happy for somebody to take this over assuming @Conni2461 signs off on this being a feature we should incorporate into telescope-core.
It's something users requested here and there and but you can also make the argument we are reinventing the quickfix list here.
I'd love to help out with this PR which is the very thing that prevents me from fully switching to Telescope even as file browser but I need some clarification.
In short this PR should allow a behavior similar to quickfixlist's :cnext and :cprev right? I'm a bit confused because the related issue is about restoring the last known state of the picker invoked, but the PR even though related to that seems to have a slightly different scope, namely only allowing to cycle through the entries of the last known state of the picker.
Also I don't get how to test out this feature.
What I'm doing now is (on your branch and with minimal_init.vim):
- Running Telescope find_files
- Typing some random stuff and selecting the entry
- Running the snippet in the PR's description and getting this error:
E5113: Error while calling lua chunk: ...acker/start/telescope.nvim/lua/telescope/actions/set.lua:39: attempt to index a nil value
stack traceback:
...acker/start/telescope.nvim/lua/telescope/actions/set.lua:39: in function 'run_replace_or_original'
...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'shift_selection'
...cker/start/telescope.nvim/lua/telescope/actions/init.lua:81: in function 'run_replace_or_original'
...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'select_next'
test.lua:13: in main chunk
Any update on this PR?
Sorry, as mentioned before I will not be continuing this. Happy for anyone to take over :)