GitHub Actions, GitLab CI/CD and Forgejo Actions in Neovim
Experience the power of :CI. Native CI logs in normal Neovim buffers with
real ANSI colours, step-level folds, and more.
- Neovim 0.13+
git- At least one of:
With vim.pack:
vim.pack.add({
'https://forge.barrettruth.com/barrettruth/ci.nvim',
})" checks for the active pull request on this branch
:CI
:CI 123
" git revision
:CI master
:CI v0.11.0
:CI HEAD~3
" github.com, gitlab.com or Forgejo CI URLs
:CI https://github.com/neovim/neovim/actions/runs/30208531214/job/89810718120
:CI https://github.com/neovim/neovim/pull/40993
:CI https://gitlab.com/gitlab-org/cli/-/pipelines/2767853157
:CI https://gitlab.com/gitlab-org/cli/-/merge_requests/3734
:CI https://codeberg.org/forgejo/forgejo/actions/runs/12
" the <cWORD> under the cursor
:CI .Without an argument, :CI falls back to branch-head checks if no pull request
is open.
Work with a ci:// buffer via buffer-local mappings. <CR> opens the check
under the cursor, and - goes back to the list you came from. Walk log steps
or sections with [[ and ]].
Automatic refresh is best-effort. Use R or :e to reload a stale buffer.
:help ci- Numbers (all forges): a bare
:CI 123is a pull or merge request. Use:CI refs/heads/123for a numeric branch name. - In-progress jobs (GitHub): gh cannot fetch running logs. Running jobs display their step status instead.
- In-progress jobs (GitLab): pipeline views show job statuses. Opening a job follows its trace best-effort; updates can arrive in bursts tens of seconds apart.
- Steps (GitLab): jobs have no steps, so a log's own sections fold in their place and
[[/]]move between sections. Nothing folds beneath them. - Stages (GitLab): a checks list names no stage, because a commit's statuses do not carry one. A pipeline's own job list does.
- Revisions (GitLab): branches, tags and SHAs are resolved by the server;
HEADis resolved locally. Git revision expressions such asHEAD~3are not supported. - In-progress jobs (Forgejo): logs are reloaded in full until a runner completion marker is found. A job buffer's status is not refreshed.
- Re-run and cancel (Forgejo): unsuppported
- Steps (Forgejo): logs fold on
##[group]alone, which may be less accurate than Github and GitLab.