Compare commits
3 Commits
fd1c5d6e79
...
b7218c64c2
Author | SHA1 | Date | |
---|---|---|---|
b7218c64c2
|
|||
0789260637
|
|||
561f1d8f8b
|
@ -469,6 +469,11 @@ require "dep" {
|
||||
}
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
- Lazy loading nvim-cmp doesn't work as the external sources don't get reconized
|
||||
by nvim-cmp when it's loaded.
|
||||
|
||||
## License
|
||||
|
||||
dep is licensed under the [MIT License](LICENSE).
|
||||
|
@ -3,6 +3,7 @@ local packager = require("dep.package")
|
||||
|
||||
---@class module
|
||||
---@field name string name of the module
|
||||
---@field desc string description of the module
|
||||
---@field path string path to the module
|
||||
---@field mod table the module
|
||||
local module = {}
|
||||
@ -22,6 +23,7 @@ function module:new(modpath, prefix, overrides)
|
||||
setmetatable(o, self)
|
||||
|
||||
o.name = "<unnamed module>"
|
||||
o.desc = "<undescribed module>"
|
||||
if type(modpath) == "string" then
|
||||
if prefix ~= nil then
|
||||
if prefix:sub(#prefix) ~= "." and modpath:sub(1, 2) ~= "." then
|
||||
@ -38,6 +40,7 @@ function module:new(modpath, prefix, overrides)
|
||||
end
|
||||
end
|
||||
o.name = o.mod.name or o.name
|
||||
o.desc = o.mod.desc or o.desc
|
||||
|
||||
-- allow a module to be a spec
|
||||
if spec_man.check(o.mod, true) ~= false then
|
||||
|
@ -305,6 +305,11 @@ function package:ensureadded(force)
|
||||
return false
|
||||
end
|
||||
l:set_load(function()
|
||||
-- ensure that we can't attempt to load a plugin twice via lazy loading
|
||||
if self.loaded then
|
||||
return
|
||||
end
|
||||
|
||||
logger:log("lazy", "triggered %d lazy hooks for %s", #self.lazy_load,
|
||||
self.id)
|
||||
loadpkg(self)
|
||||
|
Reference in New Issue
Block a user