Skip to content

Command palette: word-level search with multi-token cross-column matching#9727

Merged
kovidgoyal merged 2 commits intokovidgoyal:masterfrom
dmgerman:palette-improvements
Mar 23, 2026
Merged

Command palette: word-level search with multi-token cross-column matching#9727
kovidgoyal merged 2 commits intokovidgoyal:masterfrom
dmgerman:palette-improvements

Conversation

@dmgerman
Copy link
Copy Markdown

Hi Kovid,

Since using it I discovered that the current search mechanism was not ideal. So I improved it:

  • Implement a word-level scoring engine that replaces the previous FZF-based approach. The fzf approach was to restrictive. Instead allow multiple tokens, each matched independently and their scores combined. Tokens are separated by space.

  • Added documentation and tests.

  • Highlight matches in current selection

Now you can search for "click mouse" and it will match "mouse_click".

thanks again

--dmg

gitmsr added 2 commits March 22, 2026 17:28
…hing

Implement a word-level scoring engine for the command palette that replaces
the previous FZF-based approach. Query tokens are matched against pre-tokenized
words in each column (key, action, category) with exact, prefix, and
edit-distance scoring. Multiple search terms are supported with cross-column
matching — items matching more tokens rank higher. Compound query tokens
containing delimiters (e.g. mouse_selection) are matched as units.

Add comprehensive tests using a Go builder API instead of raw JSON blobs,
covering single-token, multi-token, partial-match, ranking, mouse binding,
and unmapped action scenarios.

Add documentation for the command palette kitten.
@kovidgoyal kovidgoyal merged commit 0c7f17a into kovidgoyal:master Mar 23, 2026
14 checks passed
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.

3 participants