mirror of
https://github.com/itme-brain/nvim.git
synced 2026-05-08 15:10:13 -04:00
updated compat
This commit is contained in:
parent
62d06a8bdc
commit
23fb66df0b
7 changed files with 159 additions and 87 deletions
6
init.lua
6
init.lua
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue