
If you’ve ever found yourself jumping between a dozen methods across six different files, trying to trace a call path or understand a complex function, you know the pain. Global marks help, but they’re capped at 26. Quickfix lists work, but they’re tied to search results, not your own judgment. What you really need is a way to park bookmarks on specific lines, organize them in any order, and navigate between them without losing context.
That’s exactly what Waypoint.nvim does. Created by Patrick Sharp, this Neovim plugin lets you bookmark lines of code, arrange them relative to each other, and jump between them with syntax-highlighted previews. It’s like having a personal map of your codebase that you can reshape as you explore.
Let me show you how it works.
What Makes Waypoint Different?
There are already bookmark plugins for Neovim, so why another one? Waypoint’s key differentiator is reorderable bookmarks with syntax-highlighted previews. You can arrange your bookmarks to match a call path, rename them for clarity, and see the surrounding code context without leaving the window.
Here’s what sets it apart:
- Reorderable bookmarks — Move bookmarks up and down to match execution flow or call paths
- Syntax-highlighted preview — See the bookmarked code with context, not just a line number
- Per-project management — Different bookmarks per working directory, saved automatically
- Resilient to file changes — Code formatters, git checkouts, and rebases won’t lose your marks
- Bulk operations via visual mode — Select multiple lines and bookmark them all at once
- Undo and Redo — Accidentally deleted a bookmark? Undo it.
- Table-aligned display — Clean, organized layout with optional columns for filename, path, line number, and context
Installation
Waypoint requires Neovim 0.11.7 or later built with LuaJIT. If you’re using lazy.nvim, add this to your plugin config:
{
'patrick-sharp/waypoint.nvim',
dependencies = {
'nvim-telescope/telescope.nvim',
'nvim-tree/nvim-web-devicons',
},
config = function()
require("waypoint").setup {}
end
}
The Telescope integration lets you search waypoints across multiple files, and nvim-web-devicons adds file-type icons to the waypoint window. Both are optional — the plugin works perfectly without them.
If you prefer a minimal setup:
'patrick-sharp/waypoint.nvim'
That’s it. No configuration required to get started.
Getting Started: Your First Waypoints
Waypoint introduces a set of m-prefixed keybindings that are intuitive once you use them a few times. Here’s the cheat sheet:
| Key | Action |
|---|---|
ma |
Create waypoint after the current line (adds to end of list) |
me |
Create waypoint at the end of the waypoint list |
mb |
Create waypoint at the beginning of the waypoint list |
ms |
Show the waypoint window |
mc |
Edit the name of a waypoint |
md |
Delete a waypoint |
mq |
Set the quickfix list to all waypoints |
mu |
Undo the last waypoint change |
The naming convention is easy to remember: m for mark, followed by the action letter. ma = mark after, md = mark delete, ms = mark show.
Your First Session
Open a file with a few functions — say, a Python module with 3-4 methods. Navigate to each function definition and press ma. You’ve just created bookmarks for each one.
Now press ms. A split window opens showing all your waypoints in order, with a preview of the code at each location. You can:
- Press
Enterto jump to a waypoint - Press
JorKto reorder them - Press
dto delete one - Press
/to search within the waypoint list
It’s that straightforward. No heavy configuration, no external dependencies needed.
Navigating the Waypoint Window
The waypoint window deserves its own walkthrough because this is where Waypoint really shines. It’s not just a list of line numbers — it’s a full-featured, syntax-highlighted preview environment.
Once you press ms, you’ll see a split pane with each waypoint listed by name (or filename + line number if unnamed), along with a code preview for the selected entry.
Window Navigation Keys
| Key | Action |
|---|---|
j / k |
Move to next/previous waypoint |
gg / G |
Jump to first/last waypoint |
<CR> |
Jump to the selected waypoint’s location |
J / K |
Move the current waypoint down/up in the list |
c / C |
Increase/decrease the amount of context shown |
b / B |
Increase/decrease context before the waypoint |
a / A |
Increase/decrease context after the waypoint |
d |
Delete the current waypoint (or selection) |
u / <C-r> |
Undo / Redo |
Here’s a workflow I use regularly: When I’m reviewing a pull request that touches multiple files, I add waypoints at each changed function. Then I reorder them to match the logical flow — database migration first, then model changes, then controller updates, then views. The J and K keys make reordering effortless.
A Real-World Scenario: Tracing a Call Path
Let me walk you through a concrete example. Say you’re working on a Python web application and you need to understand what happens when a user submits a form. The request passes through a view function, a service layer, a database query, and a template renderer.
Here’s what I do:
- Open each file involved and press
maat each key function definition - Press
msto see all my waypoints in one window - Press
mcto rename each waypoint with a descriptive label (e.g., “Form Submit Handler”, “Service.validate()”, “Model.save()”) - Reorder them with
J/Kto match the execution path - Navigate through them with
Enteras I trace the data flow
This is where Waypoint beats Neovim’s built-in marks. Global marks only let you jump to a location — they don’t give you a bird’s-eye view of everything you’ve marked, and you can’t see context without actually jumping there. Waypoint shows you the code inline, in the order you choose.
The plugin’s README mentions a real case: adding metrics to a large Java scheduling application that required reading 33 unique methods across 6 classes. That’s way beyond the 26 global mark slots Neovim offers, and Waypoint handles it without breaking a sweat.
Customizing Waypoint
Waypoint comes with sensible defaults, but you can tweak almost everything. Here’s a sample configuration:
require("waypoint").setup {
enable_highlight = true, -- Highlight bookmarked lines
enable_relative_waypoint_numbers = false,
file_ignore_patterns = {},
default_context_lines = 3, -- Lines of context around each waypoint
default_before_context_lines = 0,
default_after_context_lines = 0,
always_show_brackets = true,
fixed_width = nil, -- Set a numeric value for fixed width
}
You can also customize display columns. The waypoint window shows columns for name, file path, line number, file text, and context — and you can toggle each one with specific keybindings (sn for name, sp for path, sl for line, etc.).
What About Cross-File Navigation?
Waypoint works across files by default. When you add a waypoint in one file and switch to another, both sets of bookmarks appear in the waypoint window. The window shows the filename alongside each entry, so there’s no confusion about which file you’re looking at.
If you have Telescope installed, you can use it to search waypoints globally with text matching. Press ms to open the waypoint window, then / to search within the list. The preview updates to show matching entries.
For transferring waypoints between files — say, moving a bookmark from one module to another — the window’s mT command handles that cleanly.
When Should You Use Waypoint?
After a few weeks of using this, here’s when I reach for it:
- Code reviews – like I covered in how to review AI-generated code as a senior engineer — Mark each changed function, reorder by file, review systematically
- Refactoring – similar to keeping your computer awake during long refactoring sessions — Mark all the places a variable or function is used, work through them one by one
- Onboarding to a new codebase — Walk through the entry points and key data flows, naming waypoints as you go
- Debugging a complex issue – especially when AI coding agents introduced unexpected changes — Mark each point in the call stack where data changes hands
- Tracing API endpoints — Mark the route definition, controller, service, and database layers
The beauty of Waypoint is that it doesn’t force a workflow on you. It’s a tool that adapts to how you think about code.
Final Thoughts
Waypoint.nvim won’t rewrite your code or debug your logic for you. What it will do is make navigating complex codebases feel less like getting lost in a maze and more like having a map you drew yourself.
If you spend any serious time reading code — reviewing PRs, debugging, tracing call paths, or onboarding to new projects — this plugin is worth the five minutes it takes to install and learn.
It’s one of those tools that you wonder how you managed without once it clicks. Give it a try on your next code review session.
Happy navigating.