Skip to content

Instantly share code, notes, and snippets.

@will
Created April 12, 2022 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save will/d3eea33e6dc341579c988afbbd9403bd to your computer and use it in GitHub Desktop.
Save will/d3eea33e6dc341579c988afbbd9403bd to your computer and use it in GitHub Desktop.
Neovim require all Lua files in directory
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