-
-
Notifications
You must be signed in to change notification settings - Fork 918
Description
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 be 10000.
But in:
telescope.nvim/lua/telescope/pickers.lua
Line 319 in 20bf205
| __scrolling_limit = tonumber(vim.F.if_nil(opts.temp__scrolling_limit, 250)), |
__scrolling_limit is set to 250 when opt.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 exceeds 250, users might mistakenly believe that they have thoroughly searched for the keywords.
And traversing 250 entries is more likely compared to navigating through 10000 entries.
So, I believe setting max_result to 10000 is more reasonable, or alternatively, allowing users to configure this value based on their performance preferences would be a better option.
Neovim version
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1692716794Operating system and version
Ubuntu 22.04
Telescope version / branch / rev
master
checkhealth telescope
==============================================================================
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.3.1Steps to reproduce
nvim:Telescope highlights- The prompt shows the total of result may beyond
250(like500or something) - When you scolling results list, you'll find that not all results is on the Results list.
Expected behavior
The max_result value should set to something like 10000 not 250, 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 to 250, whcih users might mistakenly believe that they have thoroughly searched for the keywords.
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
},
},
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. '/plugin/packer_compiled.lua',
display = { non_interactive = true },
},
}
end
_G.load_config = function()
require('telescope').setup()
require('telescope').load_extension('fzf')
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing Telescope and dependencies.")
vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]