Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telescope FZF wont run due to the attempt to call a nil value #55

Closed
sdushantha opened this issue Feb 15, 2022 · 3 comments
Closed

Telescope FZF wont run due to the attempt to call a nil value #55

sdushantha opened this issue Feb 15, 2022 · 3 comments

Comments

@sdushantha
Copy link

Hey,

I have installed telescope.nvim and telescope-fzf-native.nvim but running :Telescope fzf returns the following error:

E5108: Error executing lua ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:184: attempt to call a nil value                                                                                         
stack traceback:                                                                                                                                                                                                
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:184: in function 'run_command'                                                                                                              
        ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:244: in function 'load_command'                                                                                                             
        [string ":lua"]:1: in main chunk 

Some info that may help debugging:

$ nvim --version
NVIM v0.6.1
Build type: Release
LuaJIT 2.0.5
Compiled by builduser

$ lua -v
Lua 5.4.4  Copyright (C) 1994-2022 Lua.org, PUC-Rio

$ uname -a
Linux unicorn 5.16.5-arch1-1 #1 SMP PREEMPT Tue, 01 Feb 2022 21:42:50 +0000 x86_64 GNU/Linux

Config for telescope.nvim:
https://github.com/sdushantha/dotfiles/blob/master/nvim/.config/nvim/lua/plugins/configs/telescope.lua

Config showing installation of telescope.nvim and telescope-fzf-native.nvim:
https://github.com/sdushantha/dotfiles/blob/master/nvim/.config/nvim/lua/plugins/init.lua#L75-L78

Any help is appreciated :)

@Conni2461
Copy link
Member

:Telescope fzf is not a command.

It replaces an internal function that handles the sorting. It should just work in Telescope find_files ...

@sdushantha
Copy link
Author

sdushantha commented Feb 15, 2022

Ah that makes sense, thank you @Conni2461.
The reason why I thought :Telescope fzf was a command was because it showed up in the autocompeletion:
image

But after running :Telescope find_files I did notice that it seemed to be very slow compared to the regular fzf.
See the video below for comparison.

2022-02-15_10.59.20.mp4

EDIT: Does this maybe have something to do with the disclaimer you have put in the README?

This projects implements fzf algorithm in c. So there might be differences in matching. I don't guarantee completeness.

@Conni2461
Copy link
Member

both are bugs in telescope. The first one is a bug regarding extensions that it isn't possible to only export internal functions.

Second one is a UI issue: nvim-telescope/telescope.nvim#1423 with a PR that tries to rewrite our whole ui rendering here nvim-telescope/telescope.nvim#1491

Also is it a fair comparison with fzf showing a total of 166 511 files and telescope 456 738?
The raw performance of this implementation of fzf is slightly faster than the original implementation of fzf in go. But its also more lightweight with no utf8 case support: #32 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants