mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(cache): add hack to work-around incorrect requires back. Not a fan of this. Fixes #603
This commit is contained in:
parent
77223786aa
commit
79f85e5fed
1 changed files with 6 additions and 0 deletions
|
@ -231,6 +231,12 @@ function Cache.find(modname, opts)
|
|||
local basename = modname:gsub("%.", "/")
|
||||
local idx = modname:find(".", 1, true)
|
||||
|
||||
-- HACK: fix incorrect require statements. Really not a fan of keeping this
|
||||
if idx == 1 then
|
||||
modname = modname:gsub("^%.+", "")
|
||||
basename = modname:gsub("%.", "/")
|
||||
idx = modname:find(".", 1, true)
|
||||
end
|
||||
local topmod = idx and modname:sub(1, idx - 1) or modname
|
||||
|
||||
-- OPTIM: search for a directory first when topmod == modname
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue