mirror of
https://github.com/harivansh-afk/forge.nvim.git
synced 2026-04-15 04:03:29 +00:00
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:
parent
830442f856
commit
97698c2af1
2 changed files with 34 additions and 13 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue