Skip to content
FossShelf
Home / Categories / For Engineers

Nvim Cmp

Extensible completion engine for Neovim with full LSP support

Replaces Github Copilot, Supermaven

9.49K stars
Screenshot of Nvim Cmp

Who it's for

Neovim developers replacing built-in completion

Provides a unified popup for LSP completions, buffer words, file paths, and snippets that Neovim's built-in omnifunc and keyword completion handle separately. The result is one consistent interface across all completion sources with fuzzy matching and documentation previews.

If you are satisfied with Neovim's built-in completion or use a minimal Neovim config intentionally, nvim-cmp adds configuration overhead you may not want.

Developers who want local completion without paid services

Runs entirely inside Neovim with zero cloud calls. All completion candidates come from local sources: the LSP server running on your machine, your open buffers, and your filesystem. No code leaves the editor process, and there is no subscription cost.

If you primarily want AI-generated code suggestions rather than LSP and buffer completions, GitHub Copilot or Supermaven address that need more directly.

Plugin authors building Neovim tooling

The source API allows any Neovim plugin to feed completion candidates into nvim-cmp. Database plugins, REST client plugins, and language-specific tools can expose their completions through a documented interface that users already have configured.

If your plugin targets both Neovim and Vim, nvim-cmp is Neovim-only and Lua-only. Vim-compatible plugins need a different completion integration.

The problem

Neovim ships with basic built-in completion, but it lacks the polish and extensibility developers expect from a modern code editor. LSP-aware completions, snippet expansion, path suggestions, and command-line completion each require separate configuration, and making them work together without conflicts takes real effort. Paid alternatives like GitHub Copilot and Supermaven fill part of this gap with AI-generated suggestions, but they route your code through external servers, charge per-seat fees, and replace the completion pipeline rather than extending it. Developers who want precise, deterministic LSP completions alongside AI suggestions need a local completion engine that handles the foundational layer without vendor lock-in.

How it works

Full LSP completion support

Surfaces every completion item your language server provides, including documentation popups, signature help, and auto-import suggestions. Works with any LSP server configured through nvim-lspconfig, covering languages from TypeScript and Python to Rust and Go.

Pluggable source architecture

Each completion source is a separate plugin: cmp-nvim-lsp for language servers, cmp-buffer for open buffer text, cmp-path for file paths, cmp-cmdline for Neovim command-line completion. The Wiki lists dozens of community sources. Install only what you use; remove a source without breaking others.

Snippet engine integration

Works with vim-vsnip, LuaSnip, mini.snippets, UltiSnips, and snippy. The snippet engine is a required configuration choice, but any of the five supported engines slots in through the same expand callback interface.

Command-line completion

Extends beyond insert mode into Neovim's command line. The cmp-cmdline source completes Ex commands, search patterns, and file paths in the : and / prompts, replacing Neovim's built-in wildmenu with the same filtered popup used during editing.

Customizable key mappings and behavior

Ships with preset mappings that mimic Neovim's native completion behavior, and exposes a Lua mapping API for full control. You can bind confirm, abort, scroll documentation, and trigger manual completion to any key combination. The presets are a starting point, not a constraint.

Features

  • Full LSP completion support
  • Pluggable source architecture
  • Snippet engine integration
  • Command-line completion
  • Customizable key mappings and behavior

Recommended for this setup

Strengths

  • MIT license, free, no cloud dependency: nvim-cmp is MIT licensed and runs entirely inside Neovim. There is no subscription, no API key, no telemetry, and no code sent to external servers. GitHub Copilot charges $10/month per seat; Supermaven charges for its pro tier. nvim-cmp costs nothing.
  • Large ecosystem of community sources: The nvim-cmp Wiki lists completion sources for LSP, buffers, paths, command line, git commits, emoji, LaTeX symbols, Copilot integration, database tables, and more. The source API is documented, so writing a custom source for a proprietary system takes one Lua file.
  • Flicker-free rendering with smart sorting: The completion popup renders without flicker even under rapid typing, a stated design goal of the project. Candidates are sorted by LSP priority, fuzzy match score, and source order, with the ranking configurable through Lua comparator functions.
  • Active maintenance with broad adoption: 9,486 stars and 440 forks as of November 2026, with the last commit pushed on 2026-11-05. The plugin is a standard dependency in most Neovim starter configurations and lazy.nvim setups, making community support readily available.

Trade-offs

  • 273 open issues on GitHub: The repository has 273 open issues. The maintainer states this is a hobby project and sets expectations that bug fixes require a minimal reproduction config. Response times on edge-case issues may be slow.
  • Lua configuration required: Setup involves writing Lua to define sources, key mappings, and snippet engine integration. The recommended configuration in the README spans 50+ lines of Lua. Developers unfamiliar with Neovim's Lua API will face a steeper learning curve than installing a VS Code extension.
  • Not an AI code generator: nvim-cmp completes from deterministic sources: your LSP, buffer text, file paths, and snippets. It does not generate novel code from natural language prompts. Developers who need AI-powered code generation still need a separate plugin like copilot.lua or a Supermaven integration alongside nvim-cmp.

Tech stack

Languages
—
Frameworks
—
Databases
—
Tooling
—

FAQ

Does nvim-cmp work with GitHub Copilot?

Yes. Community sources like copilot-cmp feed Copilot suggestions into the nvim-cmp popup alongside LSP completions. Many users run both: nvim-cmp handles deterministic LSP and path completions, while Copilot provides AI-generated suggestions through the same interface.

Which snippet engine should I use with nvim-cmp?

nvim-cmp requires a snippet engine. The README shows vim-vsnip as the default example. LuaSnip is the most popular choice in Lua-first setups. mini.snippets, UltiSnips, and snippy are also supported. All five work through the same expand callback in the nvim-cmp config.

Is nvim-cmp still maintained?

Yes. The last push to the repository was on 2026-11-05, and the project has 9,486 stars with 440 forks. The maintainer notes this is a hobby project and asks for minimal reproduction configs with bug reports, but development continues actively.

What is the license for nvim-cmp?

MIT. You can use, modify, and redistribute nvim-cmp in any project, including commercial and proprietary setups, with no restrictions beyond preserving the license notice.

Can nvim-cmp complete Neovim command-line commands?

Yes. The cmp-cmdline source provides autocompletion for Ex commands typed after : and search patterns typed after / or ?. It replaces Neovim's built-in wildmenu with the same popup used during insert-mode completion.

Similar tools

More in Engineers