Skip to content

analogrelay/copilot.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

copilot.nvim

A minimal NeoVim plugin for running one or more GitHub Copilot CLI sessions in terminal panes.

Requirements

  • NeoVim 0.8+
  • copilot on your PATH

lazy.nvim

{
  "analogrelay/copilot.nvim",
  config = function()
    require("copilot").setup({
      -- optional overrides
      -- cli_command = "copilot",
      -- split_direction = "horizontal",
      -- split_size = nil,
      -- editor = "nvim",
    })
  end,
}

Configuration

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).

Commands

  • :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.

Session behavior

  • Activating a session (spawn/menu/explicit command) makes it the current session.
  • :Copilot with no argument always returns to that current session.
  • If the current session is closed, the current-session pointer is cleared.

About

Copilot CLI integration for NeoVim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages