- Lua 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| doc | ||
| ftplugin | ||
| lua/revue_companion | ||
| media | ||
| plugin | ||
| tests | ||
| .gitignore | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| PLAN.md | ||
| README.md | ||
| selene.toml | ||
| stylua.toml | ||
| Taskfile.yml | ||
| vim.yml | ||
revue-companion.nvim
Revue in Neovim: your repository's pull requests, a whole review without leaving Neovim, and the way back, Revue opening a pull request in the Neovim that has its branch.
- The branch's pull request:
:Revueopens it in Revue,:Revue browsein the browser,:Revue yankcopies its link, andrequire("revue_companion").status()puts#12 ✓in your statusline. - The list and each pull request's page:
:Revue list(Revue's sections as folds, a filter, a search),:Revue pickthrough yourvim.ui.selectpicker, and a page per pull request with its files, conversation, Slack threads and stack. - In your own files: signs where the pull request changes them, your
pending comments,
:Revue diffagainst its base,:Revue commenton a selection. - A review in a tab:
:Revue reviewshows the changed files as a tree and each file before and at the head in diff mode, the conversations under their lines. Reply, resolve, react, comment on either side, edit and delete your drafts, apply suggested changes, mark files viewed, then:Revue submitwith a summary and a verdict. - The way back: Revue's Open in editor opens a pull request here, in the tab that has its branch.
It asks Revue everything by running the revue command, so no token ever
enters Neovim, and nothing it runs blocks the editor. Revue's app needn't be
running.
Requirements
- Neovim 0.11 or later.
- Revue, installed. The review
needs a Revue that answers
editor 4(revue --versionsays it), the way backeditor 9; the plugin says when yours is too old for something.
Installing
With vim.pack, Neovim's own plugin manager (Neovim 0.12 or later):
vim.pack.add({
{ src = "https://forgejo.cleangame.dev/cleangamedev/revue-companion.nvim", version = vim.version.range("*") },
})
That's the whole installation: nothing to call, nothing to set, nothing to
lazy-load. vim.pack.update() brings new releases (vX.Y.Z tags).
The plugin loads itself lazily, so whatever installs it, don't lazy-load it
(no cmd, keys or event): that would only hide :Revue and the
<Plug> mappings until then.
- lazy.nvim:
{ url = "https://forgejo.cleangame.dev/cleangamedev/revue-companion.nvim", version = "*" } - mini.deps:
MiniDeps.add({ source = "https://forgejo.cleangame.dev/cleangamedev/revue-companion.nvim" })(itsmainis always the latest release) - Neovim 0.11, by hand:
git clone https://forgejo.cleangame.dev/cleangamedev/revue-companion.nvim ~/.local/share/nvim/site/pack/revue/start/revue-companion.nvim, then:helptags ALL.
Then :checkhealth revue_companion says whether it finds Revue, and what it
answers.
Using it
:help revue-companion has it all. In short:
| Command | Does |
|---|---|
:Revue |
Opens the branch's pull request in Revue |
:Revue list / :Revue pick |
The repository's pull requests |
:Revue review [LINK] |
Reviews the branch's pull request (or LINK's) in a tab |
:Revue submit |
Submits the review |
:Revue threads |
The review's conversations in the quickfix list |
:Revue comment |
A pending comment on the lines selected |
:Revue diff |
The current file against the pull request's base |
:Revue list puts the repository's open pull requests in Revue's
sections, each with its author, review and checks; <CR> on one shows its
page, with its files and conversation.
In a file the branch's pull request changes, signs mark the lines it adds and changes, and your pending comment shows at the end of its line.
No key is mapped for you: each command has a <Plug> mapping
(vim.keymap.set("n", "<leader>rr", "<Plug>(RevueReview)")). The plugin's
own buffers have their keys, listed by g? there.
Settings, all optional, in vim.g.revue_companion anywhere in your config:
vim.g.revue_companion = {
path = nil, -- the revue executable, when it isn't found
headless = true, -- let the revue command answer when the app isn't running
signs = true, -- the pull request's changes in your files
comments = true, -- your pending comments in your files
register = "auto", -- tell Revue this Neovim runs, for its Open in editor (not over SSH or in a container)
auto_viewed = false, -- in a review, mark a file viewed when you leave it at its end
}
Where it's made
This repository is published from the nvim/ folder of
cleangamedev/revue-companion,
the Revue companions for every editor, at each release. Issues and changes
go there. The tests run here as well: task test, task lint, task doc
(they fetch mini.test and luacov into .deps/; StyLua and selene come from
PATH).
License
MIT OR Apache-2.0, like Revue.



