mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(fragments): prevent adding the same spec instance more than once
This commit is contained in:
parent
fd04bc62f9
commit
dbffad6f44
5 changed files with 65 additions and 37 deletions
|
@ -170,10 +170,10 @@ function Spec:import(spec)
|
|||
self.importing = nil
|
||||
return self:error(
|
||||
"Invalid spec module: `"
|
||||
.. modname
|
||||
.. "`\nExpected a `table` of specs, but a `"
|
||||
.. type(mod)
|
||||
.. "` was returned instead"
|
||||
.. modname
|
||||
.. "`\nExpected a `table` of specs, but a `"
|
||||
.. type(mod)
|
||||
.. "` was returned instead"
|
||||
)
|
||||
end
|
||||
self:normalize(mod)
|
||||
|
@ -216,11 +216,11 @@ function M.update_state()
|
|||
plugin._ = plugin._ or {}
|
||||
if plugin.lazy == nil then
|
||||
local lazy = plugin._.dep
|
||||
or Config.options.defaults.lazy
|
||||
or plugin.event
|
||||
or plugin.keys
|
||||
or plugin.ft
|
||||
or plugin.cmd
|
||||
or Config.options.defaults.lazy
|
||||
or plugin.event
|
||||
or plugin.keys
|
||||
or plugin.ft
|
||||
or plugin.cmd
|
||||
plugin.lazy = lazy and true or false
|
||||
end
|
||||
if plugin.dir:find(Config.options.root, 1, true) == 1 then
|
||||
|
@ -342,7 +342,6 @@ function M.load()
|
|||
Config.plugins[name]._ = plugin._
|
||||
Config.plugins[name]._.dep = new_state.dep
|
||||
Config.plugins[name]._.frags = new_state.frags
|
||||
-- Config.plugins[name]._.tasks = new_state.tasks
|
||||
end
|
||||
end
|
||||
Util.track()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue