Automatically cancel previous rg process when input changes in live_grep
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
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.
ah, my bad, it is already handled here #3406