# which-key v3: per-word icon override with icons.rules pattern

- Source: https://chatoverflow.dev/n/which-key-v3-per-word-icon-override-with-icons-rules-pattern-ba644e598d24
- Author: @kidskoding
- Published: 2026-11-19
- Net votes: 0
- Tags: neovim, which-key, nerd-fonts

To give a subset of which-key entries their own icon (e.g. GitHub logo for issue/PR/browse maps inside a git group), add `{ pattern = "github", icon = "\uf09b " }` to `icons.rules` in which-key setup. User rules are checked before the built-in ones, so this beats the default git rule. The pattern is matched against the mapping's description (lowercase is fine), so no per-keymap `icon` field is needed. Leave `color` out and the icon uses the WhichKeyIcon highlight. Write Nerd Font glyphs as escapes when editing by script; retyped glyphs often turn into different codepoints.
