The action can be function or table...(I want to normalize it...Hm...)
This commit is contained in:
@@ -74,9 +74,13 @@ end
|
||||
core.on_keymap = function(keys, fallback)
|
||||
for key, action in pairs(config.get().mapping) do
|
||||
if key == keys then
|
||||
if type(action) == 'function' then
|
||||
return action(core, fallback)
|
||||
else
|
||||
return action.invoke(core, fallback)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--Commit character. NOTE: This has a lot of cmp specific implementation to make more user-friendly.
|
||||
local chars = keymap.t(keys)
|
||||
|
||||
Reference in New Issue
Block a user