picker-based forge workflow for Neovim
Find a file
2026-03-28 15:18:01 -04:00
.github ci: release workflow 2026-03-28 14:57:15 -04:00
doc docs: add compatibility matrix and capabilities to vimdoc 2026-03-28 14:37:00 -04:00
lua/forge ci: format 2026-03-28 15:06:17 -04:00
plugin feat: add capabilities system and per-forge compatibility 2026-03-28 14:36:32 -04:00
scripts ci: add busted to ci script 2026-03-28 15:06:26 -04:00
spec ci: tests 2026-03-28 15:10:08 -04:00
.busted feat: tests and better vim validate 2026-03-28 15:05:55 -04:00
.editorconfig feat: initial commit 2026-03-27 16:46:28 -04:00
.gitignore feat: initial commit 2026-03-27 16:46:28 -04:00
.luarc.json feat: initial commit 2026-03-27 16:46:28 -04:00
.pre-commit-config.yaml ci: update pre-commit 2026-03-27 19:15:47 -04:00
.prettierignore feat: initial commit 2026-03-27 16:46:28 -04:00
.prettierrc feat: initial commit 2026-03-27 16:46:28 -04:00
flake.lock more tweaks 2026-03-27 18:17:12 -04:00
flake.nix more tweaks 2026-03-27 18:17:12 -04:00
forge.nvim-scm-1.rockspec feat: tests and better vim validate 2026-03-28 15:05:55 -04:00
LICENSE feat: initial commit 2026-03-27 16:46:28 -04:00
README.md doc: minimize readme 2026-03-28 15:18:01 -04:00
selene.toml feat: initial commit 2026-03-27 16:46:28 -04:00
stylua.toml feat: initial commit 2026-03-27 16:46:28 -04:00
vim.yaml feat: initial commit 2026-03-27 16:46:28 -04:00

forge.nvim

Forge-agnostic git workflow for Neovim

PR, issue, and CI workflows across GitHub, GitLab, and Codeberg/Gitea/Forgejo — without leaving your editor.

Features

  • Automatic forge detection from git remote (gh, glab, tea)
  • PR lifecycle: list, create (compose buffer with template discovery, diff stat, reviewers), checkout, worktree, review diff, merge, approve, close/reopen, draft toggle
  • Issue management: list, browse, close/reopen, state filtering
  • CI/CD: view runs per-branch or repo-wide, stream logs, filter by status
  • Code review via diffs.nvim with unified/split toggle and quickfix navigation
  • Commit and branch browsing with checkout, diff, and URL generation
  • File/line permalink generation and yanking
  • fzf-lua pickers with contextual keybinds
  • Pluggable source registration for custom or self-hosted forges

Requirements

Installation

Install with your package manager of choice or via luarocks:

luarocks install forge.nvim

Documentation

:help forge.nvim

FAQ

Q: How do I configure forge.nvim?

Configure via vim.g.forge before the plugin loads. All fields are optional:

vim.g.forge = {
  sources = { gitlab = { hosts = { 'gitlab.mycompany.com' } } },
  display = { icons = { open = '', merged = '', closed = '' } },
}

Q: How do I install with lazy.nvim?

{
  'barrettruth/forge.nvim',
  dependencies = { 'ibhagwan/fzf-lua' },
}

Q: How do I create a PR?

<c-g> to open the picker, select Pull Requests, then ctrl-a to compose. Or from a fugitive buffer: cpr (compose), cpd (draft), cpf (instant from commits), cpw (push and open web).

Q: Does review mode require diffs.nvim?

Yes. Without diffs.nvim, diff actions and review toggling are unavailable.

Q: How does forge detection work?

forge.nvim reads the origin remote URL and matches against known hosts and any custom sources.<name>.hosts entries. The first match wins, and the CLI must be in $PATH.