Skip to content

Commit 413dd5b

Browse files
committed
fix: dont return init.lua in lsmod
1 parent 359c260 commit 413dd5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/core/util.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ end
135135
---@param fn fun(modname:string, modpath:string)
136136
function M.lsmod(root, fn)
137137
M.ls(root, function(path, name, type)
138-
if type == "file" and name:sub(-4) == ".lua" then
138+
if type == "file" and name:sub(-4) == ".lua" and name ~= "init.lua" then
139139
fn(name:sub(1, -5), path)
140140
elseif type == "directory" and vim.loop.fs_stat(path .. "/init.lua") then
141141
fn(name, path .. "/init.lua")

0 commit comments

Comments
 (0)