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
|
||||||
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
|
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
|
||||||
-- skip mapping this as its mapppings are loaded in lspconfiguti
|
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
||||||
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 {})
|
if mapping_info.opts then
|
||||||
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
mapping_info.opts = nil
|
||||||
|
end
|
||||||
|
|
||||||
if mapping_info.opts then
|
map_func(keybind, mapping_info, opts)
|
||||||
mapping_info.opts = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
map_func(keybind, mapping_info, opts)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue