Skip to content

Commit

Permalink
feat(plugin): allow some lazy.nvim spec props to be set by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 28, 2022
1 parent 9997523 commit c8553ca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,15 @@ function M.load()
local spec = M.spec()

-- add ourselves
spec.plugins["lazy.nvim"] = nil
spec:add({ "folke/lazy.nvim", lazy = true, dir = Config.me })
spec:add({ "folke/lazy.nvim" })
-- 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
Config.plugins = spec.plugins
Expand All @@ -228,6 +235,7 @@ function M.load()
Util.track("state")
M.update_state()
Util.track()
require("lazy.core.cache").indexed_unloaded = false
end

-- Finds the plugin that has this path
Expand Down

0 comments on commit c8553ca

Please sign in to comment.