updated compat

This commit is contained in:
Bryan Ramos 2026-04-08 15:50:18 -04:00
parent 62d06a8bdc
commit 23fb66df0b
7 changed files with 159 additions and 87 deletions

View file

@ -1,9 +1,11 @@
local function load_config_directory(directory)
local config_path = vim.fn.stdpath("config") .. "/lua/" .. directory
local files = vim.fn.glob(config_path .. "/*.lua", false, true)
local files = vim.fn.readdir(config_path, function(name)
return name:sub(-4) == ".lua"
end)
for _, file in ipairs(files) do
local file_name = vim.fn.fnamemodify(file, ":t:r") -- Extract filename without extension
local file_name = file:sub(1, -5)
require(directory .. "." .. file_name)
end
end