Skip to content

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

Closed
luizhcrocha wants to merge 2 commits into
savedra1:mainfrom
luizhcrocha:main
Closed

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

Conversation

@luizhcrocha
Copy link
Copy Markdown

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/bubles 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 no 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.

I tested and, for me, got exactly the result I wanted. Hope you and clipse users like it.

@luizhcrocha
Copy link
Copy Markdown
Author

I'll close so i can use may main for a while, and reopen from a branch.

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