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
13
init.lua
13
init.lua
@ -36,8 +36,13 @@ local core_conf_files = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- source all the core config files
|
-- source all the core config files
|
||||||
for _, name in ipairs(core_conf_files) do
|
for _, file_name in ipairs(core_conf_files) do
|
||||||
local path = string.format("%s/core/%s", vim.fn.stdpath("config"), name)
|
if vim.endswith(file_name, 'vim') then
|
||||||
local source_cmd = "source " .. path
|
local path = string.format("%s/core/%s", vim.fn.stdpath("config"), file_name)
|
||||||
vim.cmd(source_cmd)
|
local source_cmd = "source " .. path
|
||||||
|
vim.cmd(source_cmd)
|
||||||
|
else
|
||||||
|
local module_name, _ = string.gsub(file_name, "%.lua", "")
|
||||||
|
require(module_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user