Created
April 12, 2022 16:09
-
-
Save will/d3eea33e6dc341579c988afbbd9403bd to your computer and use it in GitHub Desktop.
Neovim require all Lua files in directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local fd = vim.loop.fs_scandir(vim.fn.stdpath('config') .. '/lua/user/') | |
for name in | |
function() return vim.loop.fs_scandir_next(fd) end | |
do require('user.' .. name:gsub('.lua\z', '')) end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment