Skip to content

Commit 101691f

Browse files
committed
nvim(plugins): init: vim.fn.glob -> vim.fs.dir
1 parent d76e339 commit 101691f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nvim/.config/nvim/lua/plugins/init.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ local function load_plugin_specs()
1616
local specs = {}
1717
local loaded = {}
1818
local plugins_dir = vim.fs.dirname(debug.getinfo(2, "S").source:sub(2))
19-
local files = vim.split(vim.fn.glob(plugins_dir .. "/*", true), "\n")
2019

21-
for _, file in ipairs(files) do
22-
local basename = vim.fs.basename(file):match("(_.*).lua$")
20+
for file in vim.fs.dir(plugins_dir) do
21+
local basename = file:match("(_.*).lua$")
2322

2423
if basename and basename ~= "init" then
2524
---@type LazyPluginSpec

0 commit comments

Comments
 (0)