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

Any plans to integrate with fzf-lua? #63

Open
niamleeson opened this issue May 4, 2024 · 4 comments
Open

Any plans to integrate with fzf-lua? #63

niamleeson opened this issue May 4, 2024 · 4 comments

Comments

@niamleeson
Copy link

I switched to fzf-lua since it was much faster at finding things than telescope. Would it be possible to integrate with the plugin? https://github.com/ibhagwan/fzf-lua

@danielfalk
Copy link
Owner

Could you clarify what's faster exactly? Telescope is just providing a picker for smart-open. It doesn't do the finding part, so most of that performance isn't a telescope issue.

Where telescope may be a performance issue is if the picker takes too long to appear (though that seems pretty quick to me).

The place where telescope is a performance issue is where we insert entries into the picker. It seems every time we add an entry, telescope has to process that entry and possibly sort it. This gets slow for hundreds of entries, so we limit the number of entries shown in the picker at any given time--which is generally OK because the whole point of this plugin is to provide you with the thing you were looking for as the top result or at least as close to the top as possible.

@niamleeson
Copy link
Author

The UI opening/closing of telescope isn't slow. In my case, the finding files or live grep of telescope was always at least two seconds slower for a huge codebase when compared to fzf-lua on M3 Pro. If your codebase has less than like 1000 files, there is no difference between the two.

Also, I forget if telescope has this, but fzf-lua also has really great fuzzy searching for texts inside all the files. 🙂

@srcrip
Copy link

srcrip commented May 6, 2024

it shouldn't be too hard to do. I have an example here of the same function call filling in telescope, mini.files, and fzf lua: https://github.com/srcrip/torus.nvim/tree/master/lua/torus/integrations I could take a shot at a PR.

@srcrip
Copy link

srcrip commented May 6, 2024

one thing I don't know much about though is how to do custom sorting in fzf-lua. it seems simple enough to dump a lua table into it, but this plugin uses all kinds of custom sorting. I assume fzflua probably respects the order of the table that you give it, but then you'd have to extract the sorting logic that happens in the telescope parts here and order the table before you pass it to fzf lua. or maybe I'm off base here. if anyone knows more about how you do that in fzf lua maybe they can chime in?

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

3 participants