A minimal NeoVim plugin for running one or more GitHub Copilot CLI sessions in terminal panes.
- NeoVim 0.8+
copiloton your PATH
{
"analogrelay/copilot.nvim",
config = function()
require("copilot").setup({
-- optional overrides
-- cli_command = "copilot",
-- split_direction = "horizontal",
-- split_size = nil,
-- editor = "nvim",
})
end,
}require("copilot").setup({
cli_command = "copilot",
split_direction = "horizontal", -- "horizontal" or "vertical"
split_size = nil, -- number or nil
editor = "nvim", -- exported as EDITOR for Copilot sessions
})Each spawned session always sets EDITOR=nvim by default (or your configured editor value).
:CopilotSpawn- Always create a new Copilot session and activate it.:Copilot[ session]- Without arg, jump to current session or create one if none exists. With arg, activate that session id or buffer number.:CopilotMenu- Show active sessions and activate the selected one.:CopilotClose[ session]- Close a specific session, or close the current Copilot session when omitted.:CopilotCloseAll- Close all Copilot sessions.
- Activating a session (spawn/menu/explicit command) makes it the current session.
:Copilotwith no argument always returns to that current session.- If the current session is closed, the current-session pointer is cleared.