1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

feat: move lua conf under lua directory

This commit is contained in:
jdhao 2023-07-28 22:27:54 +02:00
parent 671c78df9b
commit e53ee104ec
4 changed files with 9 additions and 4 deletions

View File

@ -36,8 +36,13 @@ local core_conf_files = {
}
-- source all the core config files
for _, name in ipairs(core_conf_files) do
local path = string.format("%s/core/%s", vim.fn.stdpath("config"), name)
local source_cmd = "source " .. path
vim.cmd(source_cmd)
for _, file_name in ipairs(core_conf_files) do
if vim.endswith(file_name, 'vim') then
local path = string.format("%s/core/%s", vim.fn.stdpath("config"), file_name)
local source_cmd = "source " .. path
vim.cmd(source_cmd)
else
local module_name, _ = string.gsub(file_name, "%.lua", "")
require(module_name)
end
end