whatisgithub

What is nvim-surround-wk?

gregorias/nvim-surround-wk — explained in plain English

Analysis updated 2026-05-18

35LuaAudience · developerComplexity · 1/5Setup · easy

In one sentence

A Neovim plugin that shows a labeled keyboard shortcut menu for nvim-surround actions using Which Key.

Mindmap

mindmap
  root((nvim-surround-wk))
    What it does
      Connects two Neovim plugins
      Shows labeled surround menu
      No visual hints without it
    Tech stack
      Lua
      Neovim
      nvim-surround and Which Key
    Use cases
      Labeled shortcut popup
      Custom surround labels
      Faster shortcut learning
    Audience
      Neovim users
      Developers

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

What do people build with it?

USE CASE 1

See a labeled popup menu of available surround types while editing text in Neovim.

USE CASE 2

Add readable labels to custom surround definitions so Which Key can display them.

USE CASE 3

Learn nvim-surround shortcuts faster by seeing options instead of memorizing them.

What is it built with?

LuaNeovim

How does it compare?

gregorias/nvim-surround-wkshenawy29/xdg-nvfilechooser.nvimbjarneo/omarchy-ochre-theme
Stars351916
LanguageLuaLuaLua
Setup difficultyeasyhardeasy
Complexity1/53/51/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Neovim 0.11 or newer plus specific recent versions of nvim-surround and Which Key.

So what is it?

This is a small plugin for Neovim, a text editor popular among programmers, that connects two existing plugins together. The first is nvim-surround, which lets you quickly wrap text in brackets, quotes, HTML tags, or other paired characters and then change or remove those wrappers with short keyboard commands. The second is Which Key, which shows a popup menu of available keyboard shortcuts while you are in the middle of typing a command sequence, so you do not have to remember every option from memory. What this plugin adds is that when you trigger a surround action in Neovim, Which Key will now show a labeled menu of the available surround types you can apply. Without this plugin, nvim-surround works but offers no visual hint about which character to type next. With it, you see a list of options with readable labels like the one shown in the README screenshot. Setup is straightforward if you already use these tools. You add the plugin through your package manager and call the setup function. For the built-in surrounds that come with nvim-surround, labels are already provided. For any custom surrounds you define yourself, you add a label field to the surround configuration table so Which Key has text to display. The README notes two limitations: all surrounds that should appear in the menu need to be configured in advance because Which Key cannot process triggers it has not been told about, and the space character cannot be used as a trigger key, which the author attributes to a Which Key limitation. The plugin requires Neovim 0.11 or newer and specific recent versions of both dependency plugins.

Copy-paste prompts

Prompt 1
Help me set up nvim-surround-wk with my existing nvim-surround and Which Key configuration.
Prompt 2
Explain how this plugin connects nvim-surround actions to Which Key menus.
Prompt 3
Show me how to add a label for a custom surround so it appears in the Which Key popup.
Prompt 4
What Neovim and plugin versions does nvim-surround-wk require?

Frequently asked questions

What is nvim-surround-wk?

A Neovim plugin that shows a labeled keyboard shortcut menu for nvim-surround actions using Which Key.

What language is nvim-surround-wk written in?

Mainly Lua. The stack also includes Lua, Neovim.

How hard is nvim-surround-wk to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nvim-surround-wk for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.