coq_nvim: a completion engine built around a SQLite index and an interruptible scheduler
Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
At a glance
- What is it?
- coq_nvim is a Neovim completion plugin that indexes candidates into SQLite and C B-trees and runs matching on a coroutine scheduler. It is fast, opinionated, and not the plugin to pick if you want a small dependency footprint.
- Who is it for?
- Adopt coq_nvim if you want completion on every keystroke with LSP, ctags, treesitter, path and buffer sources unified behind one fuzzy matcher, and you accept a Python runtime and a GPL-3.0 plugin. Do not adopt it if you need a pure-Lua dependency graph, if you rely on tags files produced by the original ctags, or if you cannot tolerate a treesitter source that the README itself calls slow and crash prone on large files.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Lua, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- ms-jpq/coq_nvim3,812 ★ · -3
| Repository | 2026-09-24 | 2026-11-15 |
|---|---|---|
| ms-jpq/coq_nvim | 3.8k | 3.8k |
-3 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The problem coq_nvim takes on: completion that keeps up with typing
Most completion plugins decide how often to ask their sources for candidates. Some wait for a pause in typing, some cap how many requests run at once, and some drop a request when a newer one arrives. coq_nvim's README takes the opposite position: results on every keystroke, and it lists throttling as something it does not do. That single decision drives the rest of the design. If you are going to match on every key, the matcher has to be cheap, the candidate set has to be pre-indexed, and the work has to be interruptible when the user keeps typing.
The plugin is aimed at people who already run an LSP client, a tags file, or a large codebase in Neovim and find that completion lags behind their typing. It is not aimed at someone who wants a single-file Lua plugin with no external processes. The README is explicit that this is a C-and-SQLite system with a Python component, and the repository's requirements.txt pins two packages from the same author (std2 and pynvim_pp) plus PyYAML, all fetched from GitHub archive URLs rather than PyPI. That is a real supply-chain characteristic to weigh before installing.
How the SQLite index and the coroutine scheduler fit together
The README's performance section names four mechanisms: native C in-memory B-trees, SQLite VM interrupts, a coroutine based incremental and interruptible scheduler, and TCP-esque flow control. Read together, they describe a pipeline where candidates are stored in an index, queries run against that index inside SQLite, and the scheduler can abandon a query mid-flight when a newer keystroke arrives. The B-trees are the in-memory structure that makes lookup cheap; the SQLite interrupts are what let the plugin stop a running query instead of waiting for it to finish.
The fuzzy matcher is not just a substring filter. The README describes a weighted average of relative ranks and ensemble metrics, plus recency and proximity bonuses, and gives error-correction examples: cour resolves to colour_space, flgr to flag_group, nasp to Namespace. Those examples matter because they set the expectation: the matcher tolerates transposition and omission, which is why it can rank a candidate a user did not literally type. The scheduler is the piece that keeps this affordable on every keystroke.
Sources feed this pipeline as separate clients. The README lists LSP, TreeSitter, CTags, paths, buffers, registers, tmux, and modular Lua sources, with third-party integrations in a separate repository (coq.thirdparty). Each source has its own refresh behaviour: CTags is described as incremental and automatic background compilation, non-blocking, while buffers are described as real time. The TreeSitter source is the exception, and the README says so plainly.
Installing coq_nvim and wiring up LSP in two lines
The README's install section is split by plugin manager. For Vim's plugin managers it gives a Plug line pointing at the coq branch, noting that the main plugin and the snippet pack are separate entries. The branch name is not optional: the default branch is coq, and the README's example pins it explicitly.
" main one
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}After the plugin loads, the LSP integration is the part most people get wrong. coq_nvim does not replace nvim-lspconfig; it wraps the capabilities object so that snippet support and the plugin's own capability extensions reach the server. The README shows both the legacy lspconfig style and the newer vim.lsp.config style, and says the change is two lines in each case.
local coq = require "coq" -- add this
-- legacy style
local lsp = require "lspconfig"
lsp.<server>.setup(coq.lsp_ensure_capabilities(<stuff...>)) -- after
-- new style
vim.lsp.config(<server>, coq.lsp_ensure_capabilities(<stuff...>))
vim.lsp.enable(<server>)If the LSP source produces nothing after this change, the wrapper is the first thing to check, because it is the only place coq_nvim touches the server handshake. The README also points at nvim-lspconfig as the required LSP integration, so a setup without it will not exercise the LSP source at all.
Two runtime prerequisites are easy to miss. CTags support requires Universal Ctags, not the ctags binary that ships on many systems, and the README gives the package names for macOS and Ubuntu. Icons require either a Nerd Font or disabling them through the coq_settings variable.
let g:coq_settings = { 'display.icons.mode': 'none' }Once running, :COQ stats opens the built-in performance statistics view described in the README, which is the honest way to see whether the plugin is actually keeping up on your machine rather than on someone's GIF.
TreeSitter, CTags, and the parts of coq_nvim that do not deliver the promise
The README contains a rare thing: a feature section that argues against its own feature. TreeSitter is described as still unstable in nvim0.5, slow and crash prone, and the text goes further, saying the promise of real time parsing on every keystroke is not realized, so the source parses only a limited number of lines around the cursor and only on Idle events. It also auto-disables on documents that are too large. That is a documented failure mode, not a bug report, and it means the TreeSitter source should be treated as a context hint rather than a completion source you rely on in large files.
The CTags requirement is a second sharp edge. Installing the wrong package leaves you with a tags binary that coq_nvim will not use, and the symptom is an empty or stale tags source rather than an error. The README's brew and apt lines are the fix.
The third limitation is structural rather than documented: coq_nvim is GPL-3.0 and depends on Python packages fetched from GitHub archive tarballs at pinned commit hashes. If your organization has a policy about pulling dependencies from non-registry URLs, or about GPL plugins in a distributed Neovim configuration, that combination is the thing to review before the plugin goes into a shared setup. The README does not discuss either point.
coq_nvim vs nvim-cmp vs blink.cmp: three different bets
The most common comparison is against nvim-cmp. nvim-cmp is a completion framework: it defines a source protocol and leaves matching, ranking and scheduling to the sources and to the user's configuration. coq_nvim is the opposite shape. It ships its own matcher, its own index, its own scheduler, and its own set of sources, and it asks you to configure it through one settings variable rather than by composing sources. If you want to swap in a source that does not exist yet, nvim-cmp's model is friendlier; if you want the ranking decisions made for you, coq_nvim's is.
blink.cmp is the other name that comes up. It is a newer completion plugin, and the difference in approach is that blink.cmp is written in Rust with a Lua front end, while coq_nvim keeps its hot path in C and SQLite and its source layer in Python. Both are attempts to move matching out of pure Lua; they disagree about which runtime to move it into. The practical consequence is dependency shape: coq_nvim needs a working Python provider and the pinned std2 and pynvim_pp packages, while a Rust-backed plugin needs a compiled binary. Neither is lighter than nvim-cmp, and both are less configurable at the matcher level.
There is also a category difference worth naming. coq_nvim bundles snippets (the README claims over 9000 built-in) and a snippet grammar, plus path, buffer, register and tmux sources. With nvim-cmp those are separate plugins. That bundling is why the install instructions list more than one Plug line.
Maintenance, licence, and what an upgrade actually costs
The repository is not archived, and the last push was on 2026-09-22, so the coq branch is receiving commits. The repository has no published GitHub releases, which means there is no tagged version to pin to; the README's own install example pins the branch instead. In practice that means an upgrade is a git pull of the plugin plus whatever the pinned dependency tarballs resolve to at that moment. The requirements.txt entries point at specific commit hashes (std2 at 4c89fccd09a96579ad3994dc2069e528759385dc, pynvim_pp at 6beffc4f479360489481705dc23a9ebd54f0c17d), so a dependency bump is a visible commit rather than a silent version range resolution. That is a point in favour of reproducibility, and a cost if you wanted to track upstream fixes without editing the file.
On licence: coq_nvim is GPL-3.0. That matters most if you redistribute a Neovim configuration or a product that embeds the plugin. It matters less for an individual developer running it locally. The README does not address licensing, and nothing here is legal advice; if you ship a bundled config, read the LICENSE file in the repository root yourself.
The upgrade surface is larger than a typical Lua plugin because of the Python layer. The repository carries a pyproject.toml requiring Python 3.8 or newer and a Makefile that builds a virtualenv, installs mypy and the requirements, and runs a CI target. That tooling is for contributors, not users, but it tells you the project expects to be tested against a specific Python toolchain. A Neovim whose Python provider points at an older interpreter is the most likely upgrade breakage.
Editorial conclusion
Adopt coq_nvim if you want completion on every keystroke with LSP, ctags, treesitter, path and buffer sources unified behind one fuzzy matcher, and you accept a Python runtime and a GPL-3.0 plugin. Do not adopt it if you need a pure-Lua dependency graph, if you rely on tags files produced by the original ctags, or if you cannot tolerate a treesitter source that the README itself calls slow and crash prone on large files. Verify first that Neovim's Python provider is healthy, that Universal Ctags (not ctags) is on your PATH, and that your LSP server's capabilities survive the coq.lsp_ensure_capabilities wrapper.
Frequently asked questions
What is coq_nvim and what is it used for?
coq_nvim is a Neovim completion plugin. It provides fuzzy, typo-resistant completion from LSP, TreeSitter, CTags, paths, buffers, registers, tmux and modular Lua sources, and it also bundles snippets.
How do I set up coq_nvim with LSP?
Install nvim-lspconfig, require coq, and wrap the server setup with coq.lsp_ensure_capabilities, as the README shows for both the legacy lspconfig style and the vim.lsp.config style.
Does coq_nvim need Universal Ctags?
Yes. The README states the CTags source requires Universal CTags, not ctags, and gives the brew and apt package names for replacing one with the other.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ms-jpq-coq-nvim)Star history chart for your README
[](https://hysenlabs.com/projects/ms-jpq-coq-nvim)Was this useful?