I experienced this issue in NvChad but I was able to narrow it down to telescope and fzf extension.
current_buffer_fuzzy_find throws the following error when tryin to jump to the searched word.
E5108: Error executing lua: ...r\start\telescope.nvim/lua/telescope/builtin/__files.lua:552: attempt to compare two table values
stack traceback:
...r\start\telescope.nvim/lua/telescope/builtin/__files.lua:552: in function 'run_replace_or_original'
...packer\start\telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
...k\packer\start\telescope.nvim/lua/telescope/mappings.lua:269: in function <...k\packer\start\telescope.nvim/lua/telescope/mappings.lua:268>
My investigation follows.
NvChad is using the following generic_sorter setting:
Microsoft Windows 10 Enterprise 10.0.19045 Build 19045
Telescope version / branch / rev
master / a5b69afa484038f1c4793e979d023edb478ebc0c
checkhealth telescope
telescope: require("telescope.health").check()
Checking for required plugins
- OK plenary installed.
- WARNING nvim-treesitter not found. (Required for `:Telescope treesitter`.)
Checking external dependencies
- OK rg: found ripgrep 14.1.0 (rev e50df40a19)
- OK fd: found fd 9.0.0
===== Installed extensions =====
Steps to reproduce
add generic sorter setting to setup in minimal.lua
nvim -u minimal.lua
:Telescope current_buffer_fuzzy_find
search for a word and enter
Expected behavior
Jumping to the searched word
Actual behavior
Following error is thrown:
E5108: Error executing lua: ...r\start\telescope.nvim/lua/telescope/builtin/__files.lua:552: attempt to compare two table values
stack traceback:
...r\start\telescope.nvim/lua/telescope/builtin/__files.lua:552: in function 'run_replace_or_original'
...packer\start\telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
...k\packer\start\telescope.nvim/lua/telescope/mappings.lua:269: in function <...k\packer\start\telescope.nvim/lua/telescope/mappings.lua:268>
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 {
defaults = {
generic_sorter = require('telescope.sorters').get_generic_fuzzy_sorter
}
}
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()]]
Description
I experienced this issue in NvChad but I was able to narrow it down to telescope and fzf extension.
current_buffer_fuzzy_find throws the following error when tryin to jump to the searched word.
My investigation follows.
NvChad is using the following generic_sorter setting:
If I set this at the
setup()
funtion inminimal.lua
then issue can be reproduced.As a workaround, in NvChad
custom/plugins.lua
I can either:Neovim version
Operating system and version
Microsoft Windows 10 Enterprise 10.0.19045 Build 19045
Telescope version / branch / rev
master / a5b69afa484038f1c4793e979d023edb478ebc0c
checkhealth telescope
Steps to reproduce
minimal.lua
nvim -u minimal.lua
:Telescope current_buffer_fuzzy_find
Expected behavior
Jumping to the searched word
Actual behavior
Following error is thrown:
Minimal config