Follow symlinks in the custom plugins loader

fixes: #2087
This commit is contained in:
orip
2026-06-11 18:55:49 +03:00
parent ac51593f7a
commit f0a2108ed5
+2 -2
View File
@@ -5,8 +5,8 @@
-- Iterate over all Lua files in the plugins directory and load them -- Iterate over all Lua files in the plugins directory and load them
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
for file_name, type in vim.fs.dir(plugins_dir) do for file_name, type in vim.fs.dir(plugins_dir, { follow = true }) do
if type == 'file' and file_name:match '%.lua$' and file_name ~= 'init.lua' then if (type == 'file' or type == 'link') and file_name:match '%.lua$' and file_name ~= 'init.lua' then
local module = file_name:gsub('%.lua$', '') local module = file_name:gsub('%.lua$', '')
require('custom.plugins.' .. module) require('custom.plugins.' .. module)
end end