mirror of https://github.com/folke/lazy.nvim.git
fix: dont return init.lua in lsmod
This commit is contained in:
parent
359c260911
commit
413dd5b112
|
@ -135,7 +135,7 @@ end
|
||||||
---@param fn fun(modname:string, modpath:string)
|
---@param fn fun(modname:string, modpath:string)
|
||||||
function M.lsmod(root, fn)
|
function M.lsmod(root, fn)
|
||||||
M.ls(root, function(path, name, type)
|
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)
|
fn(name:sub(1, -5), path)
|
||||||
elseif type == "directory" and vim.loop.fs_stat(path .. "/init.lua") then
|
elseif type == "directory" and vim.loop.fs_stat(path .. "/init.lua") then
|
||||||
fn(name, path .. "/init.lua")
|
fn(name, path .. "/init.lua")
|
||||||
|
|
Loading…
Reference in New Issue