# zbirenbaum/copilot.lua

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zbirenbaum-copilot-lua).**

4,086 stars · 157 forks · Lua · MIT

## Links

- GitHub: https://github.com/zbirenbaum/copilot.lua
- awesome-repositories: https://awesome-repositories.com/repository/zbirenbaum-copilot-lua.md

## Description

copilot.lua is a Lua-based Neovim plugin that integrates GitHub Copilot to provide an AI code completion engine. It delivers real-time ghost text and inline suggestions within the editor, utilizing a Neovim LSP client to manage communication and buffer-specific activations.

The project handles GitHub account integration through token-based authentication and corporate instance support. It allows for the management of AI models and the configuration of language server protocols to authorize and customize service access.

The system covers AI coding assistance through predictive edit suggestions and alternative completion viewers. It also includes configuration tools for plugin activation logic, state management, and system health inspection for troubleshooting.

## Tags

### Development Tools & Productivity

- [AI Code Completions](https://awesome-repositories.com/f/development-tools-productivity/automated-code-fix-suggestions/medical-billing-code-suggestions/ai-code-completions.md) — Delivers real-time AI-driven suggestions for lines or blocks of code at the cursor position. ([source](https://github.com/zbirenbaum/copilot.lua#readme))
- [Neovim Plugins](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins.md) — Integrates GitHub Copilot directly into the Neovim editor as a Lua-based plugin.
- [LSP Client Integrations](https://awesome-repositories.com/f/development-tools-productivity/lsp-client-integrations.md) — Uses the Language Server Protocol to manage communication and context exchange between Neovim and the Copilot server.
- [Predictive Edit Suggestions](https://awesome-repositories.com/f/development-tools-productivity/automated-code-editing-assistants/predictive-edit-suggestions.md) — Proposes the most likely subsequent code modifications based on the current state of the editor. ([source](https://github.com/zbirenbaum/copilot.lua#readme))
- [LSP Clients](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins/lsp-clients.md) — Uses a Neovim LSP client to communicate with the Copilot language server for suggestions.
- [Code Completion Controls](https://awesome-repositories.com/f/development-tools-productivity/suggestion-engines/code-completion-controls.md) — Implements mechanisms for granularly accepting, cycling, and styling AI-generated code suggestions within the editor. ([source](https://github.com/zbirenbaum/copilot.lua/blob/master/SettingsOpts.md))
- [Code Suggestion Previews](https://awesome-repositories.com/f/development-tools-productivity/working-copy-management/work-item-traceability/item-previews/contextual-preview-panels/code-suggestion-previews.md) — Displays multiple generated code options in a separate window for easier review and selection. ([source](https://github.com/zbirenbaum/copilot.lua#readme))

### Security & Cryptography

- [GitHub Authentication](https://awesome-repositories.com/f/security-cryptography/access-authentication/github-authentication.md) — Manages GitHub authentication tokens to authorize access to the AI completion service. ([source](https://github.com/zbirenbaum/copilot.lua#readme))
- [User Identity Verification](https://awesome-repositories.com/f/security-cryptography/identity-authentication/user-identity-verification.md) — Verifies user identity via environment variables or authentication flows to grant access to AI services. ([source](https://github.com/zbirenbaum/copilot.lua/blob/master/CHANGELOG.md))
- [Token-Based Authentication](https://awesome-repositories.com/f/security-cryptography/security-and-access-control/token-based-authentication.md) — Manages secure service access using GitHub identity tokens and persistent session validation.

### User Interface & Experience

- [Ghost Text Suggestions](https://awesome-repositories.com/f/user-interface-experience/autocomplete-suggestion-engines/search-keyword-suggesters/text-input-suggesters/ghost-text-suggestions.md) — Renders suggested code as non-persistent, semi-transparent ghost text ahead of the cursor.

### Artificial Intelligence & ML

- [Suggestion Option Viewers](https://awesome-repositories.com/f/artificial-intelligence-ml/batched-response-generation/alternative-completion-generation/suggestion-option-viewers.md) — Provides a dedicated panel to review and select from multiple alternative AI-generated code suggestions. ([source](https://github.com/zbirenbaum/copilot.lua/blob/master/CLAUDE.md))

### Part of an Awesome List

- [AI & Machine Learning](https://awesome-repositories.com/f/awesome-lists/ai/ai-machine-learning.md) — Lua-based implementation of AI code completion.
