Skip to content

Pickers

:BlakPick and the <leader>f* keymaps dispatch through a provider adapter, not a specific picker plugin. That means you can swap your picker backend without re-learning a single keymap.

The provider lives in lua/blak/providers/picker/.

Available providers

ProviderPluginWhen to use
fff (default)dmtrKovalenko/fffSnappiest on the common path. Native binary backend.
snacksfolke/snacks.nvim pickerAlready loaded for the dashboard, so zero extra deps.
telescopenvim-telescope/telescope.nvimFamiliar, extensible. Enabled via editor.telescope extra.
fzf_luaibhagwan/fzf-luaFastest fuzzy match if you’ve already got fzf. Enabled via editor.fzf-lua extra.

Switching provider

-- ~/.config/blak/lua/blak/user.lua
return {
picker = { provider = "snacks" }, -- fff | snacks | telescope | fzf_lua
}

Or enable a provider-loading extra:

:BlakExtras enable editor.telescope " sets provider = telescope and loads the plugin
:BlakExtras enable editor.fzf-lua " sets provider = fzf_lua and loads the plugin

Run :BlakExtras sync if the plugin is not installed yet. Every <leader>f* mapping uses the new backend as soon as the provider is available.

Fallback chain

If the configured provider isn’t loadable, the dispatcher falls back: configured → snacks → fff → telescope → fzf_lua. This is why a fresh install never lacks a working picker, even before extras are enabled or Mason has finished installing tools.

A provider that supports the requested kind but fails at call time is not skipped silently: Blak warns with the provider name and the error before trying the next one, so a broken picker configuration stays visible instead of being papered over.

Source: lua/blak/providers/picker/init.lua.

Picker kinds

:BlakPick {kind} and the keymaps map to these provider methods:

Kindfffsnackstelescopefzf_lua
filesfind_filesfiles
greplive_greplive_greplive_grep
buffersbuffersbuffers
recentrecentoldfilesoldfiles
commandscommandscommands
keymapskeymapskeymaps
helphelp_tagshelp_tags
diagnosticsdiagnosticsdiagnostics_workspace
lsp_symbolslsp_document_symbolslsp_document_symbols
workspace_symbolslsp_dynamic_workspace_symbolslsp_workspace_symbols

When a method is missing on the configured provider, the dispatcher falls back to one that has it. The old smart kind is accepted as an alias for files.

Writing a new provider

Drop a file at lua/blak/providers/picker/<name>.lua that returns a table of method-named functions:

local M = {}
function M.files(opts) ... end
function M.grep(opts) ... end
-- ...
return M

Then register it in lua/blak/providers/picker/init.lua and add it to the schema’s allowed values in lua/blak/config/schema.lua.

PRs welcome.