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:
parent
671c78df9b
commit
e53ee104ec
9
init.lua
9
init.lua
@ -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)
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user