Skip to content

Commit

Permalink
fix: dont return init.lua in lsmod
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 26, 2022
1 parent 359c260 commit 413dd5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ end
---@param fn fun(modname:string, modpath:string)
function M.lsmod(root, fn)
M.ls(root, function(path, name, type)
if type == "file" and name:sub(-4) == ".lua" then
if type == "file" and name:sub(-4) == ".lua" and name ~= "init.lua" then
fn(name:sub(1, -5), path)
elseif type == "directory" and vim.loop.fs_stat(path .. "/init.lua") then
fn(name, path .. "/init.lua")
Expand Down

0 comments on commit 413dd5b

Please sign in to comment.