diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 38b3cb0a..cc72ba7d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,5 +2,10 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information - -return {} \ No newline at end of file +local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') +for file_name, type in vim.fs.dir(plugins_dir, { follow = true }) do + if (type == 'file' or type == 'link') and file_name:match '%.lua$' and file_name ~= 'init.lua' then + local module = file_name:gsub('%.lua$', '') + require('custom.plugins.' .. module) + end +end