navigation-file: use fdfind
This commit is contained in:
parent
90c5d70a5a
commit
ca5c511a10
@ -12,7 +12,16 @@ function Fuzzy.open()
|
|||||||
Fuzzy.active = true
|
Fuzzy.active = true
|
||||||
|
|
||||||
-- Collect all files once (cached for speed)
|
-- 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.matches = Fuzzy.files
|
||||||
Fuzzy.cursor = 1
|
Fuzzy.cursor = 1
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user