mirror of https://github.com/folke/lazy.nvim.git
feat: `Plugin.local` to use a local project instead of fetching remote
This commit is contained in:
parent
afcba52b1a
commit
0ba218a065
|
@ -34,6 +34,7 @@ local M = {}
|
||||||
---@field dir string
|
---@field dir string
|
||||||
---@field enabled? boolean|(fun():boolean)
|
---@field enabled? boolean|(fun():boolean)
|
||||||
---@field lazy? boolean
|
---@field lazy? boolean
|
||||||
|
---@field local? boolean
|
||||||
---@field dependencies? string[]
|
---@field dependencies? string[]
|
||||||
---@field _ LazyPluginState
|
---@field _ LazyPluginState
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ function Spec:add(plugin, is_dep)
|
||||||
|
|
||||||
-- check for plugins that should be local
|
-- check for plugins that should be local
|
||||||
for _, pattern in ipairs(Config.options.dev.patterns) do
|
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
|
plugin.uri = Config.options.dev.path .. "/" .. plugin.name
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue