{"slug": "review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents", "title": "Review-comments.nvim: Do code review in Neovim – pass review comments to agents", "summary": "The review-comments.nvim plugin, published by developer narqo, lets Neovim users draft code review comments on individual lines or ranges and store each one as a Markdown file with JSON frontmatter in a .review-comments directory at the workspace root. The plugin, installable via vim.pack on Neovim 0.12 and newer, exposes :AddComment, :ViewComment, and :RefreshComment commands and ships an agent skill at .agents/skills/review-comment-inbox/SKILL.md that lets coding agents inspect, address, test, and remove resolved comments. Its configuration options, including output_dir and keymap, are labeled experimental.", "body_md": "Draft code review comments from inside [Neovim](https://neovim.io/).\n\nComment a line (or a range of lines) in any file in the workspace:\n\n*Colour scheme: [classylight](https://github.com/narqo/classylight.vim)*\n\nYou can add a comment from the diff too:\n\nEach comment is stored in a separate Markdown file with JSON frontmatter in the `.review-comments` directory inside the workspace root.\nYou can then point your coding agent to the stored comments, and ask it to address and to resolve each of them.\n\nUsing [vim.pack](https://neovim.io/doc/user/pack/#vim.pack) (on Neovim 0.12 and newer):\n\n```\n-- Add this to init.lua\nvim.pack.add({ 'https://github.com/narqo/review-comments.nvim' })\n```\n\n1. Select lines with visual line mode, for example `Vjj` .\n2. Run `:AddComment` while the selection is active.\n3. Enter the comment in the floating editor.\n4. Run `:write` or`:w` to save and close.\n5. The saved comment appears as virtual text after the source line and is written under `<git-root>/.review-comments/` .\n\nTo use with [`jj diffedit`](https://jj-vcs.github.io/jj/latest/cli-reference/#jj-diffedit), the plugin needs the logical file path from `nvim.difftool` to resolve the Git root from Neovim's working directory:\n\n``` js\n[merge-tools.nvim]\nedit-args = [\n  \"--cmd\",\n  \"let g:review_comments_root = trim(system('jj root'))\",\n  \"--cmd\",\n  \"packadd nvim.difftool\",\n  \"-d\",\n  \"$left\",\n  \"$right\",\n]\n```\n\n`g:review_comments_root` must be an absolute path to the workspace root. It overrides automatic root detection.\n\nRun `jj diffedit` and add comments in a any normal buffer:\n\n```\njj diffedit --tool=nvim\n```\n\nThe plugin loads comments when entering a source buffer. Each preview shows up to 40 characters from the first non-empty line.\n\nPlace the cursor inside a commented range and run:\n\n```\n:ViewComment\n```\n\nReload comments created, changed, or removed externally with:\n\n```\n:RefreshComment\n```\n\nThe agent skill at `.agents/skills/review-comment-inbox/SKILL.md` allows coding agents to inspect, address, test, and remove resolved comments.\n\nIn [pi](https://pi.dev/), start it explicitly with:\n\n```\n/skill:review-comment-inbox\n```\n\nCaution\n\nExposed configuration options are experimental.\n\n``` js\nrequire(\"review-comments\").setup({\n  output_dir = \".review-comments\",\n  keymap = \"<leader>ac\",\n})\n```\n\nFrom this plugin directory, open a file from any Git repository:\n\n```\nnvim --cmd \"set runtimepath+=$PWD\" /path/to/git-repo/source.go\nmake test\n```\n\n", "url": "https://wpnews.pro/news/review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents", "canonical_source": "https://github.com/narqo/review-comments.nvim", "published_at": "2026-09-17 19:04:21+00:00", "updated_at": "2026-09-17 19:26:24.952371+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["review-comments.nvim", "Neovim", "narqo", "vim.pack", "jj diffedit", "pi"], "alternates": {"html": "https://wpnews.pro/news/review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents", "markdown": "https://wpnews.pro/news/review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents.md", "text": "https://wpnews.pro/news/review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents.txt", "jsonld": "https://wpnews.pro/news/review-comments-nvim-do-code-review-in-neovim-pass-review-comments-to-agents.jsonld"}}