Fix default mappings not load if chadrc.lua does not exist (#2037)
* Fix default mappings not load if chadrc.lua does not exist
The regression was introduced by dab9171e64
Fix #1961 #2025
* clean up!
---------
Co-authored-by: siduck <siduck@tutanota.com>
This commit is contained in:
parent
a18d92dfa6
commit
e3bb39106e
@ -87,6 +87,6 @@ M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file
|
||||
|
||||
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
|
||||
|
||||
M.mappings = {}
|
||||
M.mappings = require "core.mappings"
|
||||
|
||||
return M
|
||||
|
@ -8,11 +8,11 @@ M.load_config = function()
|
||||
if chadrc_path then
|
||||
local chadrc = dofile(chadrc_path)
|
||||
|
||||
config.mappings = M.remove_disabled_keys(chadrc.mappings, require "core.mappings")
|
||||
config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings)
|
||||
config = merge_tb("force", config, chadrc)
|
||||
config.mappings.disabled = nil
|
||||
end
|
||||
|
||||
config.mappings.disabled = nil
|
||||
return config
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user