feat(dev): optionally fallback to git when local plugin doesn't exist (#446)

* feat: fallback to git when local plugin isn't found

* feat(option): fallback to git when local plugin doesn't exist
This commit is contained in:
Null Chilly 2023-01-25 04:55:34 +07:00 committed by GitHub
parent 809d67fcf0
commit 772d8888cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 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