- Toggle the Copilot CLI in a split window (vertical or horizontal).
- Automatically checks if the
copilotCLI is installed on startup. - Prompts to install the
copilotCLI if it's missing. - Sets the
EDITORenvironment variable tonvimfor the Copilot CLI session, so you can use Neovim to edit files from within Copilot.
- Neovim >= 0.7.0
- Node.js and npm (for the Gemini CLI)
{
"andreakinder/copilot-cli.nvim",
config = function()
require("copilot-cli").setup({
split_direction = "horizontal", -- optional: "vertical" (default) or "horizontal"
})
end,
}use {
"andreakinder/copilot-cli.nvim",
config = function()
require("copilot-cli").setup({
split_direction = "horizontal", -- optional: "vertical" (default) or "horizontal"
})
end,
}Plug 'andreakinder/copilot-cli.nvim'And then in your init.lua:
require('copilot-cli').setup()The plugin can be configured with the following options:
require('copilot-cli').setup({
split_direction = "horizontal", -- "vertical" (default) or "horizontal"
})split_direction: Controls how the Gemini CLI window opens"vertical"(default): Opens in a vertical split (side by side)"horizontal": Opens in a horizontal split (top and bottom)
require('copilot-cli').setup() -- or
require('copilot-cli').setup({
split_direction = "vertical"
})require('copilot-cli').setup({
split_direction = "horizontal"
})- Use the keymap
<leader>ogto open and close the Gemini CLI window. - In visual mode, select one or more lines and use the keymap
<leader>sgto send the selected text to the Gemini CLI. If the CLI window is not open, a floating message will prompt you to open it first.
When you first run the plugin, it will check if you have the copilot CLI installed. If not, it will prompt you to install it.