Open leonasdev opened 1 year ago
I've tried the option for a few days and noticed an issue - if you call the 'restore' picker with a different temp__scrolling_limit
value than the previous picker, instead of the previously selected line the very last one is always selected.
We actually changed it from 10000 down to 250 because of performance issues. Having a scrolling limit that high means that we actually need to sort 10k items correctly on every input change (or at least we start the sorting). if its just 250 we can discard correctly sorting everything after 250 we only need to figure out whats inside that window.
Maybe 1000 is more reasonable.
For resume we could just load zhe same scroll limit
We actually changed it from 10000 down to 250 because of performance issues. Having a scrolling limit that high means that we actually need to sort 10k items correctly on every input change (or at least we start the sorting). if its just 250 we can discard correctly sorting everything after 250 we only need to figure out whats inside that window.
Maybe 1000 is more reasonable.
For resume we could just load zhe same scroll limit
Again, an option would be nice
I faced a similar issue when going through a list of diagnostics. The list was well beyond 250 items because the diagnostic was overly sensitive. Telescope let me scroll until item 250, but it wouldn't go past this number of items even though it displayed additional results at the bottom of the list. I know I could have filtered the results, but for this particular task I couldn't write a filter that would select only the results I want with confidence.
A suggestion would be to add a shortcut that the user can press to add all the results to the current list. This would be similar to a "load more..." button in some websites. That way, all the results would have a hard limit of 250 by default, but could be increase on a case-by-case by the user.
Description
In: https://github.com/nvim-telescope/telescope.nvim/blob/20bf20500c95208c3ac0ef07245065bf94dcab15/lua/telescope/pickers.lua#L561C1-L565C44 , the comment seems to indicate that the default value for
max_result
should be10000
.But in: https://github.com/nvim-telescope/telescope.nvim/blob/20bf20500c95208c3ac0ef07245065bf94dcab15/lua/telescope/pickers.lua#L319 ,
__scrolling_limit
is set to250
whenopt.temp__scrolling_limit
is not present which seems wrong.When users search for keywords, they may scroll beyond
250
entries to find a specific item. If the actual number of entries exceeds250
, users might mistakenly believe that they have thoroughly searched for the keywords.And traversing
250
entries is more likely compared to navigating through10000
entries.So, I believe setting
max_result
to10000
is more reasonable, or alternatively, allowing users to configure this value based on their performance preferences would be a better option.Neovim version
Operating system and version
Ubuntu 22.04
Telescope version / branch / rev
master
checkhealth telescope
Steps to reproduce
nvim
:Telescope highlights
250
(like500
or something)Expected behavior
The
max_result
value should set to something like10000
not250
, or alternatively, allowing users to configure this value based on their performance preferences would be a better option.Actual behavior
The
max_result
seems accidentally set to250
, whcih users might mistakenly believe that they have thoroughly searched for the keywords.Minimal config