performance: avoid reloading config table #2360 (#2444)

* performance: avoid reloading config (#2360)

* performance: avoid reloading config

* Rm outdated info in readme

---------

Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>

* update nvchad load_config result path

* update branch names

---------

Co-authored-by: georgejean <jeangeorge385@yahoo.fr>
This commit is contained in:
Sidhanth Rathod
2023-10-16 07:24:14 +05:30
committed by GitHub
co-authored by georgejean
parent ed18649e94
commit 5748536742
7 changed files with 12 additions and 14 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ M.load_config = function()
if chadrc_path then
local chadrc = dofile(chadrc_path)
config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings)
config = merge_tb("force", config, chadrc)
config.mappings.disabled = nil
@@ -74,7 +74,7 @@ M.load_mappings = function(section, mapping_opt)
end
end
local mappings = require("core.utils").load_config().mappings
local mappings = require("nvconfig").mappings
if type(section) == "string" then
mappings[section]["plugin"] = nil