mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
refactor(loader): use vim.fs
This commit is contained in:
@@ -450,12 +450,7 @@ function Loader.lsmod(path)
|
||||
if not Loader._indexed[path] then
|
||||
local start = uv.hrtime()
|
||||
Loader._indexed[path] = {}
|
||||
local handle = vim.loop.fs_scandir(path .. '/lua')
|
||||
while handle do
|
||||
local name, t = vim.loop.fs_scandir_next(handle)
|
||||
if not name then
|
||||
break
|
||||
end
|
||||
for name, t in vim.fs.dir(path .. '/lua') do
|
||||
local modpath = path .. '/lua/' .. name
|
||||
-- HACK: type is not always returned due to a bug in luv
|
||||
t = t or uv.fs_stat(modpath).type
|
||||
|
||||
Reference in New Issue
Block a user