diff options
| author | fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> | 2021-09-01 20:11:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-01 20:11:53 +0200 |
| commit | fbe004142f69962d92eb6ede13a6721f7fdb4d50 (patch) | |
| tree | b301d26dc501f72b88ccd2c153666846fb68db96 /lua/telescope/utils.lua | |
| parent | 5d37c3ea08f40d8c9d3a9ebcc72bd641d366c110 (diff) | |
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
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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(...) |
