fix no lspmappings without custom mappings | 0f013d4e7b (commitcomment-74845391)
This commit is contained in:
parent
ebe1512108
commit
1381e924cf
|
@ -92,22 +92,22 @@ M.load_mappings = function(mappings, mapping_opt)
|
|||
end
|
||||
end
|
||||
|
||||
mappings.lspconfig = nil
|
||||
for section, section_mappings in pairs(mappings) do
|
||||
if section ~= "lspconfig" then
|
||||
-- skip mapping this as its mapppings are loaded in lspconfiguti
|
||||
for mode, mode_mappings in pairs(section_mappings) do
|
||||
for keybind, mapping_info in pairs(mode_mappings) do
|
||||
-- merge default + user opts
|
||||
|
||||
for _, section_mappings in pairs(mappings) do
|
||||
-- skip mapping this as its mapppings are loaded in lspconfiguti
|
||||
for mode, mode_mappings in pairs(section_mappings) do
|
||||
for keybind, mapping_info in pairs(mode_mappings) do
|
||||
-- merge default + user opts
|
||||
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
|
||||
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
||||
|
||||
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
|
||||
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
||||
if mapping_info.opts then
|
||||
mapping_info.opts = nil
|
||||
end
|
||||
|
||||
if mapping_info.opts then
|
||||
mapping_info.opts = nil
|
||||
map_func(keybind, mapping_info, opts)
|
||||
end
|
||||
|
||||
map_func(keybind, mapping_info, opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue