Closed tristone13th closed 7 months ago
We recently merged a PR to not cache pickers with empty prompts by default. https://github.com/nvim-telescope/telescope.nvim/pull/2817
You can disable this like so
require("telescope").setup({
defaults = {
cache_picker = {
ignore_empty_prompt = false,
},
},
})
:h telescope.defaults.cache_picker
But I'm having second thoughts on having this enabled by default since for lsp pickers (and maybe others), it's maybe reasonable to use without prompts often times.
@Conni2461 should be undo the default? We could make the default picker specific but this comes down to personal opinion and workflow so I'm not really like this idea.
Thanks, it works!
Hmm i dont have that strong preferences, i dont use resume and i also dont see why you would resume something that you dont have any filtering done yet. I think send to qflist is the superior and i use that basically always.
So yeah if you disagree feel free to change this default, i was mostly argueing from the perspective of find_files/live_grep because if you havent inserted a query why would you wanna cache it, just run it again
I can contribute another case. I use vim.fn.input to get initial search term and use telescope to fuzzy search. If I can find desired result in first few lines and does not type further characters, then resume won't work.
vim.keymap.set("n", "<leader>rg", ":lua require('telescope.builtin').grep_string({search = vim.fn.input('Search term: ')})<CR>", opts)
I often use e.g. lsp_references
and other pickers that are useful without filtering.
Hover over a symbol, get references, go to a reference.
Find out it's not what I wanted, resume telescope, find another.
lather, rinse repeat.
I'm not a big resume
user so I don't have strong opinions on this but I think I'll flip the default for it.
Description
lsp_references() pickers not included in cached pickers (Telescope resume)
Neovim version
Operating system and version
CentOS 9
Telescope version / branch / rev
master
checkhealth telescope
Steps to reproduce
Expected behavior
Show the last picker
Actual behavior
Neovim shows "No cached picker(s)"
Minimal config