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

Automatically cancel previous rg process when input changes in live_grep

Open SadSock opened this issue 4 months ago • 2 comments

Is your feature request related to a problem? Please describe.

When using live_grep in large projects, Telescope starts searching immediately as I type — even mid-word. For example, if I intend to search for "landmark", as soon as I type "land", Telescope launches a rg (ripgrep) process to search the entire codebase. This often causes the UI to freeze or become unresponsive while waiting for results. I then have to wait for that search to fully complete before typing "mark", which only then triggers a new search for "landmark".

This makes the experience painfully slow in large repositories.

Describe the solution you'd like

Could Telescope automatically kill the previous rg process as soon as the user modifies the input, and immediately start a new search with the updated query? This would prevent wasted computation and make the interface feel much more responsive.

Describe alternatives you've considered

Additional context

SadSock avatar Sep 09 '25 09:09 SadSock

or maybe, i don't know if this is already possible, but for large repositories, it could be useful to somehow mark where you want to search.

for example :this/path your_keywords_here

should be doable with the --glob 'PATTERN' flag in rg.

this would break functionality though with people that want to search for ':something', so a simple fix would be to bind to a different key for searches with paths.

IbrahimElk avatar Sep 26 '25 10:09 IbrahimElk

ah, my bad, it is already handled here #3406

IbrahimElk avatar Sep 26 '25 10:09 IbrahimElk