explaingit

folke/which-key.nvim

7,120LuaAudience · developerComplexity · 2/5Setup · easy

TLDR

WhichKey is a Neovim plugin that shows a popup listing all your keyboard shortcuts as you type them, so you can discover and remember your keybindings without ever forgetting what a key sequence does.

Mindmap

mindmap
  root((WhichKey))
    What it does
      Shows shortcuts popup
      Keypress triggered
      Shortcut discovery
    Tech Stack
      Lua
      Neovim
    Features
      Multi-mode support
      Hydra mode
      Icon support
    Customization
      Preset styles
      Custom labels
      Delay settings
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Install WhichKey to get an on-screen guide to all Neovim shortcuts so you stop forgetting your keybindings.

USE CASE 2

Add human-readable descriptions to existing Neovim key mappings so the popup shows labels instead of raw command strings.

USE CASE 3

Use hydra mode to browse all available shortcuts interactively without accidentally triggering one.

USE CASE 4

Enable the marks and registers panels to quickly view your active bookmarks and clipboard contents inside Neovim.

Tech stack

LuaNeovim

Getting it running

Difficulty · easy Time to first run · 30min

Requires Neovim 0.9.4 or newer, icons require a Nerd Font and an optional icon library, but neither is mandatory.

In plain English

WhichKey is a plugin for Neovim, a keyboard-driven text editor popular among developers. The plugin solves a common problem: Neovim can have hundreds of custom keyboard shortcuts, and it is easy to forget what you have set up. WhichKey watches your key presses and shows a small popup listing all the shortcuts that start with whatever keys you have typed so far. The popup works in multiple editing modes, including normal, insert, visual, operator-pending, terminal, and command mode. Each mode can be enabled or disabled independently. You can customize when the popup appears by adjusting a delay setting that operates separately from Neovim's built-in timeout behavior. The plugin also ships with several optional panels for viewing your active marks, registers, and spelling suggestions. Layout and appearance are configurable. Three preset styles are included: classic, modern, and helix. If those do not fit your setup, you can adjust the window dimensions, padding, and position manually. The plugin can display icons next to shortcuts, pulling them from optional icon libraries if you have those installed, and it supports a Nerd Font for icon rendering. WhichKey lets you add descriptions to your shortcuts so the popup shows human-readable labels rather than raw command strings. You can sort the entries by different criteria, such as alphabetical order, local versus global mappings, or the order they were added. A hydra mode keeps the popup open until you press Escape, which is useful when you want to browse available shortcuts without triggering one by accident. The plugin requires Neovim version 0.9.4 or newer. Icons require an optional icon library and a Nerd Font on your system, but neither is mandatory. Installation is handled through any standard Neovim package manager.

Copy-paste prompts

Prompt 1
I use lazy.nvim in Neovim and want to install which-key.nvim. Show me the plugin spec and a basic configuration to get the popup working.
Prompt 2
How do I add descriptions to my existing Neovim key mappings so they appear as human-readable labels in the which-key.nvim popup?
Prompt 3
Show me how to configure which-key.nvim using the modern preset with custom window dimensions and padding.
Prompt 4
I want to enable hydra mode in which-key.nvim so I can browse available shortcuts without triggering one accidentally. How do I set that up?
Prompt 5
How do I configure which-key.nvim to display icons next to keybindings using a Nerd Font and an optional icon library?
Open on GitHub → Explain another repo

← folke on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.