From fbe004142f69962d92eb6ede13a6721f7fdb4d50 Mon Sep 17 00:00:00 2001 From: fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> Date: Wed, 1 Sep 2021 20:11:53 +0200 Subject: feat: show keymaps for builtin actions (#1084) * Add default mappings ``and `?` for insert and normal mode, respectively, to show registered keymappings (`actions.which_key`) attached to prompt buffer --- lua/telescope/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua/telescope/utils.lua') diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index a13a424..b5be5ef 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -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(...) -- cgit v1.2.3