fix: Better mappings handling

This commit is contained in:
TJ DeVries
2021-11-19 14:09:43 -05:00
committed by Simon Hauser
parent ac38730da1
commit f68d0c2477
4 changed files with 92 additions and 39 deletions
+1 -10
View File
@@ -492,16 +492,7 @@ local apply_config = function(mod)
return vim.deepcopy(pconf)
end)()
if pconf.mappings then
defaults.attach_mappings = function(_, map)
for mode, tbl in pairs(pconf.mappings) do
for key, action in pairs(tbl) do
map(mode, key, action)
end
end
return true
end
end
opts.__name = k
if pconf.attach_mappings and opts.attach_mappings then
local opts_attach = opts.attach_mappings