← all repositories
zbirenbaum/copilot-cmp

GitHub Copilot, now playing nice with your autocomplete menu

A Lua bridge that shoves Copilot suggestions into nvim-cmp so you can stop fighting two completion UIs.

1.4k stars Lua Coding Assistants
copilot-cmp
Not currently ranked — collecting fresh signals.
star history

What it does

copilot-cmp is a thin adapter that turns copilot.lua into a source for nvim-cmp. Instead of Copilot’s ghost-text suggestions hovering off to the side, its completions appear as snippets inside your standard cmp dropdown, complete with a custom icon and highlight group.

The interesting bit

The plugin’s real work is smoothing out the rough edges of forcing two opinionated systems together. It ships a fix_pairs option that stops Copilot from generating completions that would clobber your existing brackets, and a prioritize comparator so Copilot entries don’t get buried under LSP noise—or drown out exact matches.

Key highlights

  • Requires disabling copilot.lua’s native suggestion and panel modules to avoid interference
  • Provides CmpItemKindCopilot highlight group and lspkind integration for a green GitHub icon
  • Includes a recommended <Tab> mapping that falls back to indentation on empty lines, since Copilot uniquely suggests completions from surrounding context even on blank lines
  • fix_pairs option handles bracket/quote collision edge cases automatically
  • Heavily discourages tweaking defaults; the author seems tired of configuration support tickets

Caveats

  • Pure glue code: does nothing without both copilot.lua and nvim-cmp already installed and configured
  • The README’s “highly recommended” tab configuration is essentially mandatory if you use Tab for completion selection, otherwise you’ll indent-fight with Copilot’s blank-line suggestions

Verdict

Worth it if you’re already running nvim-cmp and want Copilot in the same menu as your LSP and snippet sources. Skip if you’re happy with Copilot’s native ghost text or use a different completion framework.

Frequently asked

What is zbirenbaum/copilot-cmp?
A Lua bridge that shoves Copilot suggestions into nvim-cmp so you can stop fighting two completion UIs.
Is copilot-cmp open source?
Yes — zbirenbaum/copilot-cmp is open source, released under the MIT license.
What language is copilot-cmp written in?
zbirenbaum/copilot-cmp is primarily written in Lua.
How popular is copilot-cmp?
zbirenbaum/copilot-cmp has 1.4k stars on GitHub.
Where can I find copilot-cmp?
zbirenbaum/copilot-cmp is on GitHub at https://github.com/zbirenbaum/copilot-cmp.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.