copilot.lua  by zbirenbaum

Neovim plugin enhancing GitHub Copilot

created 3 years ago
3,630 stars

Top 13.6% on sourcepulse

GitHubView on GitHub
Project Summary

This plugin provides a fully-featured, Lua-based replacement for copilot.vim, targeting Neovim users seeking improved performance and integration with modern Lua-based Neovim plugins. It offers enhanced control over GitHub Copilot suggestions, including a dedicated panel for previewing and navigating suggestions, and aims to reduce resource consumption compared to its predecessor.

How It Works

copilot.lua leverages Neovim's built-in LSP client to communicate with the GitHub Copilot language server. It's written entirely in Lua for efficiency and easier integration with the Neovim ecosystem. The plugin manages the Copilot LSP process, handles authentication, and provides API functions for controlling suggestion display, navigation, and configuration.

Quick Start & Requirements

  • Install: Use a plugin manager like packer.nvim: use { "zbirenbaum/copilot.lua" }
  • Prerequisites: Neovim 0.10.0+, NodeJS v20+.
  • Authentication: Run :Copilot auth for permanent sign-in.
  • Configuration: Call require("copilot").setup({}) in your Neovim configuration, ideally with lazy-loading.
  • Docs: https://github.com/zbirenbaum/copilot.lua#readme

Highlighted Details

  • Pure Lua implementation for performance and integration.
  • Configurable suggestion panel with keymaps for navigation and acceptance.
  • Fine-grained control over suggestion triggering and display, including integration with nvim-cmp.
  • Support for custom authentication providers and workspace folders.
  • Experimental "binary" server mode available.

Maintenance & Community

  • The project is actively maintained by zbirenbaum.
  • Integrations with popular plugins like nvim-cmp and lualine.nvim are available.

Licensing & Compatibility

  • The repository does not explicitly state a license in the provided README.

Limitations & Caveats

  • The "binary" server mode is experimental and may require user reporting of issues.
  • Users may encounter certificate parsing errors or multiple offset encoding warnings, with provided workarounds in the FAQ.
Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
12
Issues (30d)
14
Star History
294 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.