Skip to content

feat(search): add fzf engine with frecency tiebreak#359

Open
luizhcrocha wants to merge 2 commits into
savedra1:mainfrom
luizhcrocha:feat/fzf-search-engine
Open

feat(search): add fzf engine with frecency tiebreak#359
luizhcrocha wants to merge 2 commits into
savedra1:mainfrom
luizhcrocha:feat/fzf-search-engine

Conversation

@luizhcrocha
Copy link
Copy Markdown

@luizhcrocha luizhcrocha commented Apr 14, 2026

Hi, @savedra1

I've made this to give users an option on search engine and search result optimization, so they can get the most out of the search feature, tweaking as they like.

The default is still charmbracelet/bubbles backed by sahilm/fuzzy, but if the user want's he can choose to use junegunn/fzf by adding these to settings:

{
    "search": {
        "engine": "fzf",
        "algo": "v2",
        "caseSensitivity": "smart",
        "normalize": true,
        "tiebreak": ["score", "frecency", "index"]
    }
}

One thing that I think you might not like is that I changed func sanitizedFilter to a high-order function func buildFilter, because I thought that would make the code more concise.

Wrote with Claude Code help, not full on vibecoded (I know some people hate this). Test was all Claude Code though.

feat(search): add fzf engine with frecency tiebreak

chore(Makefile): fix formatting and syntax errors
@luizhcrocha luizhcrocha changed the title ggfeat(search): add fzf engine with frecency tiebreak feat(search): add fzf engine with frecency tiebreak Apr 15, 2026
@luizhcrocha
Copy link
Copy Markdown
Author

After some usage... i think it's not quite there yet. Will mark as draft and try to improve and fix some problems.

@luizhcrocha luizhcrocha marked this pull request as draft April 15, 2026 13:46
@luizhcrocha luizhcrocha force-pushed the feat/fzf-search-engine branch 2 times, most recently from 91c7492 to e3fa456 Compare April 15, 2026 16:01
@luizhcrocha
Copy link
Copy Markdown
Author

Now i think it's quite nice. Added a way to quantize better so tiebreaks works more 'loosely', and let other tiebreak steps resolve close calls.

Fixed a bug with unsafe code, a bad usage of fzf Slab, and, I think most importantly, and need review, is that:

  • Added code to strip some chars from copied text so they can appear more cleanly on the view lists
  • Expanded the scope of searchable text from copied text to 4kb, so more text get searched.

@luizhcrocha luizhcrocha marked this pull request as ready for review April 15, 2026 16:06
@luizhcrocha luizhcrocha force-pushed the feat/fzf-search-engine branch from e3fa456 to 54b746f Compare April 17, 2026 15:17
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.

1 participant