Struggling with default key commands.
A Neovim plugin for reviewing code with linked notes. Split your window with code on the left and a markdown notes buffer on the right, where each note is linked to a specific source line. I just whipped this up with Claude-CLI, so, use at your own risk but it should be good to go. I've never made a plugin before so I'm not sure about the install process, claude wrote the README as well. I'm using it and it's pretty simple and what I need at the moment.
- Split view: source code (left) + markdown notes (right)
- Link notes to specific line numbers with
[L42]tags - Signs in the gutter show which lines have notes
- Cursor sync: moving through notes scrolls the source to the relevant line
- Notes persist to disk per file
- Quickfix list of all notes for easy navigation
Install with any Neovim plugin manager, then call setup().
lazy.nvim:
{ "okazagi/code-review.nvim", opts = {} }Any other plugin manager:
require("code-review").setup()Manual:
git clone https://github.com/okazagi/code-review.nvim
- Open a file you want to review
<leader>nRo— opens the review split (notes on the right)<leader>nRl— inserts a[L<n>]tag linking to the current source line, with a code preview- Write your notes below the tag
<leader>nRg— jump from a tag in notes back to the source line<leader>nRn— show all linked notes in the quickfix list<leader>nRc— close the review session (notes auto-save)
Notes are markdown files stored in ~/.local/share/nvim/code-review-notes/. Each linked note looks like:
[L42] `func processRequest(ctx context.Context) error {`
This function doesn't handle the timeout case properly.The [L42] tag connects the note to line 42 of the source file. Signs (>>) appear in the source gutter on linked lines.
require("code-review").setup({
notes_dir = vim.fn.stdpath("data") .. "/code-review-notes", -- where notes are saved
sign_text = ">>", -- gutter sign text
sign_hl = "DiagnosticInfo", -- sign highlight group
note_width = 0.4, -- notes panel width (fraction of screen)
prefix = "<leader>nR", -- keymap prefix (change to your preference)
})| Command | Description |
|---|---|
:CodeReviewOpen |
Start a review session |
:CodeReviewClose |
Close the session and save notes |
:CodeReviewLink |
Link current note position to source line |
:CodeReviewGoto |
Jump to source line from a [L<n>] tag |
:CodeReviewList |
Show all linked notes in quickfix |
Built with Claude Code by Anthropic.