Wormhole.nvim
is a Neovim plugin designed to make navigating between multiple
open windows effortless. When activated, it spawns unique labels for each
window, allowing you to jump directly to any window by pressing the
corresponding label key. Ideal for users who work with numerous splits.
wormhole_showcase.mp4
- Neovim version >= 0.10.0
Note
- There is no need to call the
setup
function, only call it if you need to change some options - There is no need to lazy load
wormhole
, it lazy loads by default.
lazy:
return {
"NStefan002/wormhole.nvim",
lazy = false,
version = "*",
}
:Rocks install wormhole.nvim
- Default settings
require("wormhole").setup({
labels_type = "home_row",
custom_labels = {},
label_highlight = { link = "IncSearch" },
})
option | explanation |
---|---|
labels_type |
Which characters to use for labels. Can be one of the following: home_row , numbers , custom |
custom_labels |
Array of custom labels to use. Only used if labels_type is set to custom |
label_highlight |
Options for highlight, see :nvim_set_hl() |
- You need to set a keymap to activate the
wormhole
functionality. For example:
vim.keymap.set("n", "<leader>wl", "<Plug>(WormholeLabels)", { desc = "Wormhole Labels" })
vim.keymap.set("n", "<Esc>", "<Plug>(WormholeCloseLabels)", { desc = "Wormhole Close Labels" })
Or:
vim.keymap.set("n", "<c-s-i>", "<Plug>(WormholeLabelsToggle)", { desc = "Wormhole Labels Toggle" })
- Run
:checkhealth wormhole
to diagnose possible configuration problems