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

Can the built in pickers picker remember history between nvim launches?

Open yyk opened this issue 3 years ago • 3 comments

I tried it out it doesn't. May I request this feature?

yyk avatar Aug 21 '22 19:08 yyk

uff that would require some persistent storing, which needs to remember all items in your picker. e.g. 100k files indexed from your project directory. Also we either need to make it persistent on select, which makes performance while working worse, or we need to write it to disk while nvim, closes which makes closing slower, because we cant do that async here because once neovim is closed its gone from mem, meaning we need to await writing to disk.

Reading would either make startup slow or the first Telescope resume. All not really ideal.

So i suggest you rather check out help telescope.defaults.history which keeps searches persistent, which is a decent compromise.

Also also, consider this. You work on a project with a team ... You do find_files. Work on your feature branch. branch gets merged. You close neovim, checkout master, pull (some new files appear, because you coworkers also added new stuff) and now you open neovim and do Telescope resume. The files are missing because it uses the previous indexed tree.

So i suggest we are not doing this

Conni2461 avatar Aug 26 '22 13:08 Conni2461

Would this plugin resolve this request? I just found it as I was looking for something similar.

https://github.com/prochri/telescope-all-recent.nvim

If so, see #2348, which requests the behavior be default.

thw26 avatar Jun 16 '23 13:06 thw26