an opinionated fuzzy picker
beckon-2024-05-21_20.42.59.mp4
i need a lightweight fuzzy matching picker in nvim to replace fzf in some specific usecases
- no cache for dataset
- for large datasets (say 1 million), consider using fzf
- may suffer the limits of nvim buffer: memory consumption, highlight, undo history, and something i dont know yet
- note: the undo history of beckon buffers are disabled
- no fancy UI
- no seperated windows for user input and matched result
- and unexpected user operations to buffers may cause troubles likely
- default query / placeholder
- clear the default query when user input something new
- multiple actions for the picked entry
- n_{i,o,v,t}, i_c-{m,o,/,t}
- depends on the source/provider, of course
- no multiple selection/picking
- no fzf --nth nor conceal
- since it's a buffer, you can:
- have vim modes
- use motion plugins
- an impl of vim.ui.select
- two ui layouts, which equal to fzf --layout={default,reverse}
- just works
- the use of ffi may crash nvim
- feature complete
- performance can be bad
- incremental matching results
- load partial results to the buffer
- merge update events happened in a period
- minimal lines to add highlights of matched token
- yet, nvim_set_decoration_provider is not being used.
- buffers
- arglist
- digraphs
- emojis
- windows
- lsp document symbol
- cmds/history
- zig 0.12
- nvim 0.10.*
- haolian9/infra.nvim
zig build -Doptimize=ReleaseSafe
require'beckon'.buffers()
natecraddock/zf laid the foundation of this plugin.