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/mappings.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/mappings.lua')
| -rw-r--r-- | lua/telescope/mappings.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/telescope/mappings.lua b/lua/telescope/mappings.lua index f5f3655..fa2e2f5 100644 --- a/lua/telescope/mappings.lua +++ b/lua/telescope/mappings.lua @@ -30,6 +30,7 @@ mappings.default_mappings = config.values.default_mappings ["<C-q>"] = actions.send_to_qflist + actions.open_qflist, ["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist, ["<C-l>"] = actions.complete_tag, + ["<C-_>"] = actions.which_key, -- keys from pressing <C-/> }, n = { @@ -56,6 +57,7 @@ mappings.default_mappings = config.values.default_mappings ["<C-u>"] = actions.preview_scrolling_up, ["<C-d>"] = actions.preview_scrolling_down, + ["?"] = actions.which_key, }, } @@ -222,6 +224,7 @@ mappings.execute_keymap = function(prompt_bufnr, keymap_identifier) assert(key_func, string.format("Unsure of how we got this failure: %s %s", prompt_bufnr, keymap_identifier)) key_func(prompt_bufnr) + vim.cmd [[ doautocmd User TelescopeKeymap ]] end mappings.clear = function(prompt_bufnr) |
