mirror of https://github.com/folke/lazy.nvim.git
fix(rocks): dont trigger rebuild for luarocks when build is overriden
This commit is contained in:
parent
c33b9fbf8d
commit
146de4e801
|
@ -170,10 +170,10 @@ function Spec:import(spec)
|
||||||
self.importing = nil
|
self.importing = nil
|
||||||
return self:error(
|
return self:error(
|
||||||
"Invalid spec module: `"
|
"Invalid spec module: `"
|
||||||
.. modname
|
.. modname
|
||||||
.. "`\nExpected a `table` of specs, but a `"
|
.. "`\nExpected a `table` of specs, but a `"
|
||||||
.. type(mod)
|
.. type(mod)
|
||||||
.. "` was returned instead"
|
.. "` was returned instead"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
self:normalize(mod)
|
self:normalize(mod)
|
||||||
|
@ -216,11 +216,11 @@ function M.update_state()
|
||||||
plugin._ = plugin._ or {}
|
plugin._ = plugin._ or {}
|
||||||
if plugin.lazy == nil then
|
if plugin.lazy == nil then
|
||||||
local lazy = plugin._.dep
|
local lazy = plugin._.dep
|
||||||
or Config.options.defaults.lazy
|
or Config.options.defaults.lazy
|
||||||
or plugin.event
|
or plugin.event
|
||||||
or plugin.keys
|
or plugin.keys
|
||||||
or plugin.ft
|
or plugin.ft
|
||||||
or plugin.cmd
|
or plugin.cmd
|
||||||
plugin.lazy = lazy and true or false
|
plugin.lazy = lazy and true or false
|
||||||
end
|
end
|
||||||
if plugin.dir:find(Config.options.root, 1, true) == 1 then
|
if plugin.dir:find(Config.options.root, 1, true) == 1 then
|
||||||
|
@ -264,7 +264,7 @@ function M.update_rocks_state()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
for _, plugin in pairs(Config.plugins) do
|
for _, plugin in pairs(Config.plugins) do
|
||||||
if plugin._.pkg and plugin._.pkg.source == "rockspec" then
|
if plugin._.pkg and plugin._.pkg.source == "rockspec" and plugin.build == "rockspec" then
|
||||||
plugin._.build = not installed[plugin.name]
|
plugin._.build = not installed[plugin.name]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue