docs: update vimdoc and health check for picker backends

Problem: docs listed fzf-lua as the only required dependency, and the
health check only verified fzf-lua.

Solution: update requirements to list all three picker backends, add
`picker` config option to vimdoc, update health check to report all
detected backends and mark the active one.
This commit is contained in:
Barrett Ruth 2026-03-28 17:48:45 -04:00
parent 830442f856
commit 97698c2af1
No known key found for this signature in database
GPG key ID: A6C96C9349D2FC81
2 changed files with 34 additions and 13 deletions

View file

@ -22,11 +22,20 @@ function M.check()
end
end
local has_fzf = pcall(require, 'fzf-lua')
if has_fzf then
vim.health.ok('fzf-lua found')
else
vim.health.error('fzf-lua not found (required)')
local picker_mod = require('forge.picker')
local backend = picker_mod.backend()
local picker_backends = { 'fzf-lua', 'telescope', 'snacks' }
local found_any = false
for _, name in ipairs(picker_backends) do
local mod = name == 'fzf-lua' and 'fzf-lua' or name
if pcall(require, mod) then
local suffix = backend == name and ' (active)' or ''
vim.health.ok(name .. ' found' .. suffix)
found_any = true
end
end
if not found_any then
vim.health.error('no picker backend found (install fzf-lua, telescope.nvim, or snacks.nvim)')
end
local has_diffs = pcall(require, 'diffs')