Writing
Reviewing AI-written code in Neovim with locoreview
I built a Neovim plugin to leave review comments on AI-written code and keep them in the repo, after the chat is gone.
I built locoreview because I needed a way to review AI-written code without losing my comments in a chat. I wanted to leave an objection on a line, tell the agent what needed to change, and find that comment again the next day. I use Neovim, so that’s where I put it.
The plugin stores comments in a Markdown file inside the repo. Each comment records the issue, the requested change, severity, status, author, and timestamps. It can refer to a single line, a visual selection, or a changed line in a diff. From the editor, I can jump between comments, resolve them, reopen them, or mark an issue as blocking.
Reviewing a diff
:ReviewPR opens a diff view where I can collapse context, move through files, mark sections as viewed, and leave comments. That keeps the code and the review in the same place.
When I’m ready to send fixes back to an agent, :ReviewFix can hand over the open items. The agent reads the review file for the issue and requested change. I can then return to the diff and check the result against the original comment.
Why a Markdown file
I wanted the comments to survive the session. A file in the repo is something I can read, diff, and hand to another tool or teammate. I can come back to an unresolved issue without reconstructing a conversation.
The agent can write code faster than I can review it. Keeping my objections next to that code gives me a way to track what I have checked and what still needs work.