picker-based forge workflow for Neovim
Find a file
Harivansh Rathi f3f66ae560 Fix fzf-lua ansi_from_hl compatibility
Wrap the highlighted segment render path so forge only consumes the first return value from fzf-lua's ansi_from_hl helper, and add a regression spec covering the newer two-value return shape.

Co-authored-by: Codex <noreply@openai.com>
2026-03-28 21:23:59 -04:00
.github ci: deduplicate quality checks in luarocks-dev 2026-03-28 18:37:26 -04:00
doc ci: add neovim and busted to CI shell 2026-03-28 18:40:16 -04:00
lua/forge Fix fzf-lua ansi_from_hl compatibility 2026-03-28 21:23:59 -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 Fix fzf-lua ansi_from_hl compatibility 2026-03-28 21:23:59 -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: gitignore demo files 2026-03-28 18:38:09 -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 ci: add neovim and busted to CI shell 2026-03-28 18:40:16 -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.