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/mappings.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lua/telescope/mappings.lua') 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 [""] = actions.send_to_qflist + actions.open_qflist, [""] = actions.send_selected_to_qflist + actions.open_qflist, [""] = actions.complete_tag, + [""] = actions.which_key, -- keys from pressing }, n = { @@ -56,6 +57,7 @@ mappings.default_mappings = config.values.default_mappings [""] = actions.preview_scrolling_up, [""] = 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) -- cgit v1.2.3