mirror of https://github.com/folke/lazy.nvim.git
feat(plugin): allow some `lazy.nvim` spec props to be set by the user
This commit is contained in:
parent
9997523841
commit
c8553ca44f
|
@ -212,8 +212,15 @@ function M.load()
|
||||||
local spec = M.spec()
|
local spec = M.spec()
|
||||||
|
|
||||||
-- add ourselves
|
-- add ourselves
|
||||||
spec.plugins["lazy.nvim"] = nil
|
spec:add({ "folke/lazy.nvim" })
|
||||||
spec:add({ "folke/lazy.nvim", lazy = true, dir = Config.me })
|
-- override some lazy props
|
||||||
|
local lazy = spec.plugins["lazy.nvim"]
|
||||||
|
lazy.lazy = true
|
||||||
|
lazy.dir = Config.me
|
||||||
|
lazy.config = function()
|
||||||
|
error("lazy config should not be called")
|
||||||
|
end
|
||||||
|
lazy._.loaded = {}
|
||||||
|
|
||||||
local existing = Config.plugins
|
local existing = Config.plugins
|
||||||
Config.plugins = spec.plugins
|
Config.plugins = spec.plugins
|
||||||
|
@ -228,6 +235,7 @@ function M.load()
|
||||||
Util.track("state")
|
Util.track("state")
|
||||||
M.update_state()
|
M.update_state()
|
||||||
Util.track()
|
Util.track()
|
||||||
|
require("lazy.core.cache").indexed_unloaded = false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Finds the plugin that has this path
|
-- Finds the plugin that has this path
|
||||||
|
|
Loading…
Reference in New Issue