mirror of https://github.com/folke/lazy.nvim.git
fix(loader): lua modules can be links instead of files. Fixes #66
This commit is contained in:
parent
7a57ea28d3
commit
b7c489b08f
|
@ -172,7 +172,7 @@ function M.source_runtime(...)
|
|||
Util.walk(dir, function(path, name, t)
|
||||
local ext = name:sub(-3)
|
||||
name = name:sub(1, -5)
|
||||
if t == "file" and (ext == "lua" or ext == "vim") and not M.disabled_rtp_plugins[name] then
|
||||
if (t == "file" or t == "link") and (ext == "lua" or ext == "vim") and not M.disabled_rtp_plugins[name] then
|
||||
files[#files + 1] = path
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -173,7 +173,7 @@ function M.lsmod(modname, root, fn)
|
|||
fn(modname, root .. ".lua")
|
||||
end
|
||||
M.ls(root, function(path, name, type)
|
||||
if type == "file" and name:sub(-4) == ".lua" then
|
||||
if (type == "file" or type == "link") and name:sub(-4) == ".lua" then
|
||||
if name == "init.lua" then
|
||||
fn(modname, path)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue