The pipeline.nvim plugin for Neovim allows developers to easily manage and dispatch their CI/CD Pipelines, like GitHub Actions or Gitlab CI, directly from within the editor.
- GitHub Actions
- Gitlab CI/CD (fairly untested, feel free to report bugs or open PRs)
- List pipelines and their runs for the current repository
- Run/dispatch pipelines with
workflow_dispatch
- Rerun a failed pipeline or job
- Configurable keybindings
- Allow to cycle between inputs on dispatch
Either have the cli yq installed or:
Additionally, the Gitlab provider needs the glab
cli to be installed.
Using lazy.nvim
{
'topaxi/pipeline.nvim',
keys = {
{ '<leader>ci', '<cmd>Pipeline<cr>', desc = 'Open pipeline.nvim' },
},
-- optional, you can also install and use `yq` instead.
build = 'make',
---@type pipeline.Config
opts = {},
},
The plugin requires authentication with your GitHub account to access your workflows and runs. You can authenticate by running the gh auth login command
in your terminal and following the prompts.
Alternatively, define a GITHUB_TOKEN
variable in your environment.
The plugin interacts with Gitlab via the glab
cli, all that is needed is being authenticated through glab auth login
.
:Pipeline
or:Pipeline toggle
toggles thepipeline.nvim
split:Pipeline open
opens thepipeline.nvim
split:Pipeline close
closes thepipeline.nvim
split
The following keybindings are provided by the plugin:
q
- closes thepipeline.nvim
the splitgp
- open the pipeline below the cursor on GitHubgr
- open the run below the cursor on GitHubgj
- open the job of the workflow run below the cursor on GitHubd
- dispatch a new run for the workflow below the cursor on GitHub
The default options (as defined in lua/config.lua)
{
--- The browser executable path to open workflow runs/jobs in
browser = nil,
--- Interval to refresh in seconds
refresh_interval = 10,
--- How much workflow runs and jobs should be indented
indent = 2,
providers = {
github = {},
gitlab = {},
},
--- Allowed hosts to fetch data from, github.com is always allowed
allowed_hosts = {},
icons = {
workflow_dispatch = '⚡️',
conclusion = {
success = '✓',
failure = 'X',
startup_failure = 'X',
cancelled = '⊘',
skipped = '◌',
},
status = {
unknown = '?',
pending = '○',
queued = '○',
requested = '○',
waiting = '○',
in_progress = '●',
},
},
highlights = {
PipelineRunIconSuccess = { link = 'LspDiagnosticsVirtualTextHint' },
PipelineRunIconFailure = { link = 'LspDiagnosticsVirtualTextError' },
PipelineRunIconStartup_failure = { link = 'LspDiagnosticsVirtualTextError' },
PipelineRunIconPending = { link = 'LspDiagnosticsVirtualTextWarning' },
PipelineRunIconRequested = { link = 'LspDiagnosticsVirtualTextWarning' },
PipelineRunIconWaiting = { link = 'LspDiagnosticsVirtualTextWarning' },
PipelineRunIconIn_progress = { link = 'LspDiagnosticsVirtualTextWarning' },
PipelineRunIconCancelled = { link = 'Comment' },
PipelineRunIconSkipped = { link = 'Comment' },
PipelineRunCancelled = { link = 'Comment' },
PipelineRunSkipped = { link = 'Comment' },
PipelineJobCancelled = { link = 'Comment' },
PipelineJobSkipped = { link = 'Comment' },
PipelineStepCancelled = { link = 'Comment' },
PipelineStepSkipped = { link = 'Comment' },
},
split = {
relative = 'editor',
position = 'right',
size = 60,
win_options = {
wrap = false,
number = false,
foldlevel = nil,
foldcolumn = '0',
cursorcolumn = false,
signcolumn = 'no',
},
},
}
require('lualine').setup({
sections = {
lualine_a = {
{ 'pipeline' },
},
}
})
or with options:
require('lualine').setup({
sections = {
lualine_a = {
-- with default options
{ 'pipeline', icon = '' },
},
}
})
- folke/lazy.nvim for the rendering approach