A Neovim plugin that combines Copilot LSP's Next Edit Suggestions with a built-in terminal for running AI CLI tools.
zbirenbaum/copilot.lua
A pure Lua Neovim plugin that replaces copilot.vim, providing GitHub Copilot inline suggestions, a suggestion panel, and an API for integrations.
Open-source alternative to:GitHub Copilot
- Stars
- 4,094
- Forks
- 164
- Open issues
- 17
- Last commit
- 2 days ago
What is it?
copilot.lua is a Neovim plugin written in pure Lua that serves as a replacement for GitHub's copilot.vim. It connects Neovim to the GitHub Copilot language server, showing inline ghost-text suggestions as you type and offering a split panel to preview multiple completions at once.
The plugin exposes configurable keymaps for accepting, cycling, and dismissing suggestions, along with options for auto-triggering, debouncing, filetype and buffer filtering, and logging. A native language server is downloaded and cached on first use, and a Node.js-based server can be used on platforms without a native build. An optional next edit suggestion feature works through the copilot-lsp companion plugin.
The `copilot.api` module lets other plugins build on top of it. Existing integrations cover nvim-cmp, blink.cmp, and lualine.
Key features
- 01Inline ghost-text suggestions that trigger automatically or on demand.
- 02A panel split to preview multiple completions.
- 03Configurable keymaps for accepting, cycling, and dismissing suggestions.
- 04Filetype and buffer-level control over where Copilot attaches.
- 05A `copilot.api` module for building integrations.
- 06Optional next edit suggestions via the copilot-lsp plugin.
Use cases
- Getting Copilot suggestions in Neovim without the overhead of copilot.vim.
- Showing completions alongside nvim-cmp or blink.cmp menus.
- Restricting Copilot to certain filetypes or excluding sensitive files.
- Building a custom Neovim plugin that reads Copilot suggestions through its API.
Quick start
- 1
Install the plugin with your plugin manager
- 2
Call require("copilot").setup({}) in your config to start Copilot
- 3
Sign in with Copilot inside Neovim
:Copilot auth
Things to know
- Requires Neovim 0.11.0 or higher.
- The first use downloads about 75-110 MB of native server binaries, and musl Linux needs Node.js 22+.
- The next edit suggestion (nes) feature is experimental.
Topics
FAQ
- What is copilot.lua?
- A pure Lua Neovim plugin that replaces copilot.vim, providing GitHub Copilot inline suggestions, a suggestion panel, and an API for integrations. copilot.lua is a Neovim plugin written in pure Lua that serves as a replacement for GitHub's copilot.vim. It connects Neovim to the GitHub Copilot language server, showing inline ghost-text suggestions as you type and offering a split panel to preview multiple completions at once.
- Is copilot.lua free to use? What license does it have?
- copilot.lua is open source under the MIT license. Check the license terms before using it in commercial products.
- Is copilot.lua still maintained?
- Actively maintained. The last commit to copilot.lua was on Nov 4, 2026.
- What can I use copilot.lua for?
- Getting Copilot suggestions in Neovim without the overhead of copilot.vim. Showing completions alongside nvim-cmp or blink.cmp menus. Restricting Copilot to certain filetypes or excluding sensitive files. Building a custom Neovim plugin that reads Copilot suggestions through its API.
- How do I install copilot.lua?
- Install the plugin with your plugin manager Call require("copilot").setup({}) in your config to start Copilot Sign in with Copilot inside Neovim: :Copilot auth
- Where can I get copilot.lua?
- The source code and installation instructions are on GitHub: https://github.com/zbirenbaum/copilot.lua
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Vim plugin that provides local LLM-powered fill-in-the-middle code completion and instruction-based editing via a llama.cpp server.
A Neovim plugin that provides as-you-type AI code completion using OpenAI, Gemini, Claude, Ollama, llama.cpp, Codestral and other LLM providers.
An Xcode Source Editor Extension that adds GitHub Copilot, Codeium and ChatGPT code suggestions, chat and code modification to Xcode.
VS Code extension for local LLM code completion, AI chat, and an agentic coding assistant backed by llama.cpp.
GraphiQL is an in-browser GraphQL IDE, plus the monorepo of language services, editor modes and LSP servers that power it and GraphQL editor tooling.