From e39ed31f17e35d4f42b516d10ed4340fca25eb6a Mon Sep 17 00:00:00 2001 From: fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> Date: Mon, 4 Oct 2021 20:30:32 +0200 Subject: [PATCH] chore: highlight which_key on README (#1298) --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd7fcfe..20eb13a 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,14 @@ require('telescope').setup{ defaults = { -- Default configuration for telescope goes here: -- config_key = value, - -- .. + mappings = { + i = { + -- map actions.which_key to (default: ) + -- actions.which_key shows the mappings for your picker, + -- e.g. git_{create, delete, ...}_branch for the git_branches picker + [""] = "which_key" + } + } }, pickers = { -- Default configuration for builtin pickers goes here: @@ -194,7 +201,8 @@ Many familiar mapping patterns are setup as defaults. | `` | Go to a file in a new tab | | `` | Scroll up in preview window | | `` | Scroll down in preview window | -| `/?` | Show picker mappings (in insert & normal mode, respectively) | +| `` | Show mappings for picker actions (insert mode)| +| `?` | Show mappings for picker actions (normal mode)| | `` | Close telescope | | `` | Close telescope (in normal mode) | | `` | Toggle selection and move to next selection | @@ -204,7 +212,9 @@ Many familiar mapping patterns are setup as defaults. To see the full list of mappings, check out `lua/telescope/mappings.lua` and the -`default_mappings` table. +`default_mappings` table. + +**Tip**: you can use `` and `?` in insert and normal mode, respectively, to show the actions mapped to your picker. Much like [builtin pickers](#pickers), there are a number of [actions](https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/actions/init.lua)