diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index c53ee72..eb132d3 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -265,6 +265,9 @@ function Spec:import(spec) if spec.import == "lazy" then return self:error("You can't name your plugins module `lazy`.") end + if type(spec.import) ~= "string" then + return self:error("Invalid import spec. `import` should be a string: " .. vim.inspect(spec)) + end if vim.tbl_contains(self.modules, spec.import) then return end