feat(option): fallback to git when local plugin doesn't exist

This commit is contained in:
nullchilly 2023-01-25 00:23:34 +07:00
commit dc55f6d2bf
3 changed files with 6 additions and 1 deletions

View file

@ -91,7 +91,10 @@ function Spec:add(plugin, results, is_dep)
end
end
-- dev plugins
if plugin.dev and vim.fn.isdirectory(Config.options.dev.path .. "/" .. plugin.name) == 1 then
if
plugin.dev
and (not Config.options.dev.fallback or vim.fn.isdirectory(Config.options.dev.path .. "/" .. plugin.name) == 1)
then
plugin.dir = Config.options.dev.path .. "/" .. plugin.name
else
-- remote plugin