← 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
Velocity · 7d
+0.9
★ / day
Trend
steady
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.

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