feat: `Plugin.local` to use a local project instead of fetching remote

This commit is contained in:
Folke Lemaitre 2022-12-02 19:17:38 +01:00
parent afcba52b1a
commit 0ba218a065
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ local M = {}
---@field dir string
---@field enabled? boolean|(fun():boolean)
---@field lazy? boolean
---@field local? boolean
---@field dependencies? string[]
---@field _ LazyPluginState
@ -85,7 +86,7 @@ function Spec:add(plugin, is_dep)
-- check for plugins that should be local
for _, pattern in ipairs(Config.options.dev.patterns) do
if plugin[1]:find(pattern, 1, true) then
if plugin["local"] or plugin[1]:find(pattern, 1, true) then
plugin.uri = Config.options.dev.path .. "/" .. plugin.name
break
end