feat: show keymaps for builtin actions (#1084)

* Add default mappings `<C-/>`and `?` for insert and normal mode, respectively, to show registered keymappings (`actions.which_key`) attached to prompt buffer
This commit is contained in:
fdschmidt93
2021-09-01 20:11:53 +02:00
committed by GitHub
parent 5d37c3ea08
commit fbe004142f
7 changed files with 385 additions and 1 deletions

View File

@@ -21,6 +21,10 @@ utils.get_default = function(x, default)
return utils.if_nil(x, default, x)
end
utils.cycle = function(i, n)
return i % n == 0 and n or i % n
end
utils.get_lazy_default = function(x, defaulter, ...)
if x == nil then
return defaulter(...)