Skip to content

refactor: introduce fzf-lua as an alternative of telescope.#1471

Merged
ayamir merged 14 commits into
0.11from
refactor/fzf
May 25, 2025
Merged

refactor: introduce fzf-lua as an alternative of telescope.#1471
ayamir merged 14 commits into
0.11from
refactor/fzf

Conversation

@ayamir
Copy link
Copy Markdown
Owner

@ayamir ayamir commented May 19, 2025

This pr introduce fzf-lua as fuzzy searcher to replace part functionalies of telescope.nvim to achieve higher performance when search in a big repo. I forked and rewrote search.nvim to make it support fzf-lua. Not all pickers are equivalent such as frecency and not all pickers are replaced, but now it basically works. It will close #1463.

output.mp4

@Elite-zx You can try it now.

@ayamir ayamir requested review from charliie-dev and misumisumi May 19, 2025 14:43
@ayamir ayamir marked this pull request as draft May 19, 2025 15:10
@misumisumi
Copy link
Copy Markdown
Collaborator

The search box in fzf-lua unintentionally becomes bottom when I merged it into feat/ai-chat in my environment.
This is because codecompanion.nvim calls telescope first in https://github.com/olimorris/codecompanion.nvim/blob/34d45b0790719e6c5b437d609cf583f87a4e2edb/lua/codecompanion/providers/init.lua#L3C1-L15C4 (telescope's default position is "bottom")
I replaced telescope with fzf-lua and the problem disappeared.
Hmm. Including both telescope.nvim and fzf-lua may result in unintended conflicts, so you might need to be a bit cautious.
image

@ayamir
Copy link
Copy Markdown
Owner Author

ayamir commented May 20, 2025

telescope's default position is "bottom"

I made the prompt position setting of telescope as default.

@charliie-dev
Copy link
Copy Markdown
Collaborator

sorry, recently i got very busy. i might not have time to review the PRs. 😥

@ayamir
Copy link
Copy Markdown
Owner Author

ayamir commented May 22, 2025

Finally, I chose to use fzf for searching as a configurable option for the following reasons:

  1. telescope is sufficient for most situations
  2. fzf requires additional binary dependencies, and because it uses multiple processes, it starts slower than telescope when the system load is high.

Could you review it when you have time? @misumisumi @Elite-zx

@ayamir ayamir marked this pull request as ready for review May 22, 2025 15:14
@ayamir ayamir changed the title refactor: replace telescope with fzf-lua. refactor: introduce fzf-lua as an alternative of telescope. May 23, 2025
@ayamir ayamir merged commit 528d82b into 0.11 May 25, 2025
4 checks passed
@ayamir ayamir deleted the refactor/fzf branch May 25, 2025 08:14
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

Successfully merging this pull request may close these issues.

Switch out Telescope for fzf-lua

3 participants