navigation-file: use fdfind

This commit is contained in:
Tomas Mirchev 2025-10-15 19:49:23 +03:00
parent 29c896f017
commit 89dcb057cc

View File

@ -12,7 +12,16 @@ function Fuzzy.open()
Fuzzy.active = true
-- Collect all files once (cached for speed)
Fuzzy.files = vim.fn.globpath('.', '**/*', 0, 1)
-- Fuzzy.files = vim.fn.globpath('.', '**/*', 0, 1)
local handle = io.popen('fdfind --type f --hidden --exclude .git')
if handle then
local result = handle:read('*a')
handle:close()
Fuzzy.files = vim.split(result, '\n', { trimempty = true })
else
Fuzzy.files = {}
end
Fuzzy.matches = Fuzzy.files
Fuzzy.cursor = 1