aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-03-26 12:46:24 +0100
committerLewis Russell <lewis6991@gmail.com>2023-03-26 12:46:24 +0100
commit3c82ce0d625184a90e6b2dda96e38fcb44f901d2 (patch)
tree75bea3e9d289675b555f5f06d549985f5f67f67e /runtime/lua/vim/loader.lua
parent2257ade3dc2daab5ee12d27807c0b3bcf103cd29 (diff)
downloadrneovim-3c82ce0d625184a90e6b2dda96e38fcb44f901d2.tar.gz
rneovim-3c82ce0d625184a90e6b2dda96e38fcb44f901d2.tar.bz2
rneovim-3c82ce0d625184a90e6b2dda96e38fcb44f901d2.zip
refactor(loader): use vim.fs
Diffstat (limited to 'runtime/lua/vim/loader.lua')
-rw-r--r--runtime/lua/vim/loader.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua
index 41d5579664..bafe766a5d 100644
--- a/runtime/lua/vim/loader.lua
+++ b/runtime/lua/vim/loader.lua
@@ -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