Skip to content

Commit

Permalink
fix(loader): lua modules can be links instead of files. Fixes #66
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 21, 2022
1 parent 7a57ea2 commit b7c489b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lua/lazy/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7c489b

Please sign in to comment.