refactor: Cleaning chadrc, moved to custom & moved default_config to core
This commit is contained in:
parent
22f89cfeef
commit
ca1ad15ad2
7 changed files with 53 additions and 241 deletions
|
|
@ -152,9 +152,9 @@ M.load_config = function(reload)
|
|||
"['mappings']['terminal']['esc_hide_termmode']",
|
||||
}
|
||||
|
||||
local default_config = "default_config"
|
||||
local default_config = "core.default_config"
|
||||
local config_name = vim.g.nvchad_user_config or "chadrc"
|
||||
local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua"
|
||||
local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua"
|
||||
|
||||
-- unload the modules if force reload
|
||||
if reload then
|
||||
|
|
@ -170,7 +170,7 @@ M.load_config = function(reload)
|
|||
-- print warning texts if user config file is present
|
||||
-- check if the user config is present
|
||||
if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then
|
||||
local present, config = pcall(require, config_name)
|
||||
local present, config = pcall(require, "custom/" .. config_name)
|
||||
if present then
|
||||
-- make sure the returned value is table
|
||||
if type(config) == "table" then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue