Skip to content

Add desc to mini-surround visual-mode S keymap so which-key surfaces it #76

@ooloth

Description

@ooloth

Why

The S visual-mode surround keymap has no desc, so which-key shows nothing for it — the surround-by-visual-selection feature is invisible to any user who doesn't already know the binding.

Current state

lua/config/plugins/specs/mini-surround.lua line 4 registers vim.keymap.set('x', 'S', ..., { silent = true }) with no desc key. All other surround mappings in the file have descriptions; S is the only one that is silent in which-key.

Ideal state

  • The S keymap includes a desc value (e.g. "Surround (add around selection)") so which-key surfaces it alongside the other surround mappings.

Starting points

  • lua/config/plugins/specs/mini-surround.lua — line 4 is the only keymap definition missing a desc.

QA plan

  1. Enter visual mode, select some text, then open which-key — Expect S appears with a human-readable description in the which-key popup.
  2. Press S and add a surrounding character — Expect the surround behavior is unchanged.

Done when

vim.keymap.set('x', 'S', ...) in mini-surround.lua includes a non-empty desc and which-key displays it in visual mode.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions