Skip to content

Commit 9e2ae2f

Browse files
committed
nvim(plugins): init: vim.fn.glob -> vim.fs.dir
1 parent be9caf5 commit 9e2ae2f

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,11 +16,10 @@ local function load_plugin_specs()
1616
local specs = {}
1717
local loaded = {}
1818
local curr_script_dir = vim.fs.dirname(debug.getinfo(2, "S").source:sub(2))
19-
local files = vim.split(vim.fn.glob(curr_script_dir .. "/*", true), "\n")
2019

2120
-- Load all plugins in plugins/ directory automatically.
22-
for _, file in ipairs(files) do
23-
local basename = vim.fs.basename(file):match("(_.*).lua$")
21+
for file in vim.fs.dir(curr_script_dir) do
22+
local basename = file:match("(_.*).lua$")
2423

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

0 commit comments

Comments
 (0)