wayfinder.nvim is a guided code exploration picker for the current symbol or file.
It is not a general search tool, and it does not try to replace Telescope or grep. It replaces the manual loop of jump, grep, back, open, back, and "where was that test again?"
Wayfinder opens a centered 3-pane picker and gathers connected code:
Pin useful stops into Trail while you explore, then save that Trail per project and resume it later.




e pivots from the selected code row without leaving the pickerb / f move backward and forward through explore history0.10+ripgrep for Text Matchesgit for the Git facetWith lazy.nvim:
{
"error311/wayfinder.nvim",
opts = {},
}
require("wayfinder").setup({})
vim.keymap.set("n", "<leader>wf", "<Plug>(WayfinderOpen)", {
desc = "Wayfinder",
})
Open Wayfinder on a symbol to see definitions, references, callers, likely tests, and recent commits. If there is no symbol under the cursor, Wayfinder falls back to the current file.
Calls, Refs, Tests, Git, Trail, and Saved.e to explore from the selected code result.b / f to move through explore history.a to add the current target to Trail, or A to add the whole explore path.p.| Key | Action |
|---|---|
j / k |
Move selection |
gg / G |
First / last result |
<C-u> / <C-d> |
Move by half a page |
h / l |
Previous / next facet |
<Tab> / <S-Tab> |
Next / previous facet |
<CR> |
Jump |
e |
Explore selected code result |
b / f |
Back / forward through explore history |
p |
Pin selected row into Trail |
a |
Add current Wayfinder target to Trail |
A |
Add current explore path to Trail |
P |
Open Trail |
S |
Open Trail menu |
[ / ] |
Previous / next saved Trail |
s / v / t |
Open in split / vsplit / tab |
/ / <C-l> |
Filter / clear filter |
D |
Toggle details |
? |
Toggle bottom key hints |
x |
Export current facet to quickfix |
dd / da |
Remove Trail item / clear Trail |
r |
Refresh |
q |
Close |
Trail is the breadcrumb list you build while exploring.
p pins the selected row.a pins the current Wayfinder target.A pins the current explore path.S opens save, resume, load, rename, delete, and saved Trail browse actions.Saved facet shows saved Trails as rows with item counts, active/last markers, and preview.<CR> loads the selected saved Trail.Normal :Wayfinder opens do not auto-load saved Trails. Use :WayfinderTrailResume, [ / ], the Trail menu, or the Saved facet when you want to restore a saved Trail.
e pivots Wayfinder from the selected code row. The top bar shows what will be explored, such as Explore findUser, before the pivot happens.
D details include the exact explore target location when there is room. Git rows are history rows, so they explain why they cannot be explored instead of pivoting.
Default setup is enough for normal repos. A small layout tweak looks like this:
require("wayfinder").setup({
layout = {
width = 0.88,
height = 0.72,
show_hints = true,
},
})
For large repos or monorepos, narrow broad sources to the nearest package/module:
require("wayfinder").setup({
performance = "fast",
scope = {
mode = "package",
package_markers = {
"package.json",
"tsconfig.json",
"pyproject.toml",
"go.mod",
"Cargo.toml",
".git",
},
},
})
Performance presets:
fast: tighter limits and shorter timeoutsbalanced: default behaviorfull: broader limits and looser timeoutsCore commands:
:Wayfinder:WayfinderExportQuickfix:WayfinderExportTrailQuickfixTrail commands:
:WayfinderTrailNext:WayfinderTrailPrev:WayfinderTrailOpen:WayfinderTrailShow:WayfinderTrailSave:WayfinderTrailSaveAs:WayfinderTrailLoad:WayfinderTrailResume:WayfinderTrailDelete:WayfinderTrailRenameRecommended external mappings:
vim.keymap.set("n", "<leader>wf", "<Plug>(WayfinderOpen)", { desc = "Wayfinder" })
vim.keymap.set("n", "<leader>wtn", "<Plug>(WayfinderTrailNext)", { desc = "Wayfinder Trail Next" })
vim.keymap.set("n", "<leader>wtp", "<Plug>(WayfinderTrailPrev)", { desc = "Wayfinder Trail Prev" })
vim.keymap.set("n", "<leader>wto", "<Plug>(WayfinderTrailOpen)", { desc = "Wayfinder Trail Open" })
vim.keymap.set("n", "<leader>wts", "<Plug>(WayfinderTrailShow)", { desc = "Wayfinder Trail Show" })
For full behavior and configuration details:
:help wayfinder
:checkhealth wayfinder
The repo includes a small fixture app plus a tiny demo LSP so screenshots and gifs are reproducible.
nvim -u demo/minimal_init.lua demo/fixture-app/src/user_service.ts
Move the cursor onto createUser, then run :Wayfinder.
More demo notes are in demo/README.md.
MIT