feat: add find_command option for find_files (#73)
This commit is contained in:
@@ -366,13 +366,16 @@ end
|
|||||||
builtin.find_files = function(opts)
|
builtin.find_files = function(opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
|
|
||||||
local find_command = nil
|
local find_command = opts.find_command
|
||||||
if 1 == vim.fn.executable("fd") then
|
|
||||||
find_command = { 'fd', '--type', 'f' }
|
if not find_command then
|
||||||
elseif 1 == vim.fn.executable("fdfind") then
|
if 1 == vim.fn.executable("fd") then
|
||||||
find_command = { 'fdfind', '--type', 'f' }
|
find_command = { 'fd', '--type', 'f' }
|
||||||
elseif 1 == vim.fn.executable("rg") then
|
elseif 1 == vim.fn.executable("fdfind") then
|
||||||
find_command = { 'rg', '--files' }
|
find_command = { 'fdfind', '--type', 'f' }
|
||||||
|
elseif 1 == vim.fn.executable("rg") then
|
||||||
|
find_command = { 'rg', '--files' }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not find_command then
|
if not find_command then
|
||||||
|
|||||||
Reference in New Issue
Block a user