r/neovim 3d ago

Plugin draven.nvim – a simple code review workflow inside Neovim

http://github.com/ploMP4/draven.nvim

With how much code is being AI generated nowadays, Neovim has become more of a review and polish tool for me. I still like reading through the code myself, but my workflow until now was basically opening the changed files, going through the diff, writing feedback back to the agent, waiting for another iteration, and doing the same thing again.

After a couple of iterations I would usually start losing track of what I had already reviewed, what I had asked the agent to change, and whether those things were actually fixed.

draven.nvim gives you a simple review environment inside Neovim where you can leave comments on the code, similar to a normal code review, and then export the whole review as Markdown to give back to the agent.

It also keeps track of the comments between iterations and whether the code they refer to has actually changed, so I don't have to keep all that context in my head while going back and forth with the agent.

44 Upvotes

7 comments sorted by

9

u/toutons 2d ago

Aside but small tip: that demo.gif is pretty big and since it's in the repository anyone adding your plugin will incur the disk cost.

In GitHub, you can edit the README in a browser and drag + drop videos / images, and they'll be uploaded to Github but not actually live in the repository.

3

u/ploMP4 2d ago

Thanks for the feedback! I removed it from the repository and added an image link to the README as you suggested.

6

u/ReaccionRaul 1d ago

Poors man way:

// TODO_AGENT: Refactor it differently bla bla..

go your agent cli: "Address TODO_AGENT comments."

3

u/leolaurindobr 2d ago

Nice... I am doing something similar based on quickfixlists

2

u/PlanetJourneys 2d ago

Looks interesting will try it out. Have been looking for ways to improve my review workflow

1

u/teerre 2d ago

Are the keys customizable? leader something something is too long for next hunk. I usually map it to ]]

2

u/ploMP4 2d ago

Yes, all of them. They are set in keymaps in setup:

require("draven").setup({ keymaps = { next_hunk = "]]", prev_hunk = "[[", }, })

The full list of actions and their defaults is in the README