ms-jpq
coq_nvim
Lua

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

Last updated Jul 9, 2026
3.8k
Stars
103
Forks
188
Issues
+3
Stars/day
Attention Score
97
Language breakdown
No language data available.
β–Έ Files click to expand
README

coq.nvim πŸ”

Named after the famous theorem prover

coq also means ιΈ‘ in franΓ§ais quΓ©bΓ©cois, and I guess πŸ₯–.

Fast as FUCK and loads of features.

Faster Than Pure Lua

  • Native C in-memory B-trees
  • SQLite VM interrupts
  • Coroutine based incremental & interruptible scheduler
  • TCP-esque flow control
More details at the PERFORMANCE.md

Features

Note: Due to compression, reality is faster than gifs

Fast as fuck

  • Results on every keystroke
  • Throttling? Never heard of her
  • Look at the gifs! The bottom few are the fastest when I didn't slow down on purpose to show features.

Fuzzy Search

  • Typo resistant
  • Recency bonus
  • Proximity bonus
Error correction: cour -> colourspace, flgr -> flaggroup, nasp -> Namespace

fuzz_search.img

Preview

  • Press key to view documentation in big buffer
  • Auto open preview on side with most space
  • Ubiquitous: Tags, LSP, TreeSitter, Paths, Snippets
doc_popup.img

LSP

  • Incremental completion
  • Client-side caching
  • Multi-server completion (i.e. tailwind + cssls)
  • Multi-encoding utf-8, utf-16, utf-32
  • Header imports
lsp</em>imports.img
  • Snippet Support
lsp</em>snippets.img

Install the Nvim Official LSP integration

Requires 2 lines of change to support LSP snippets

local coq = require "coq" -- add this

-- legacy style local lsp = require "lspconfig" lsp.<server>.setup(<stuff...>) -- before lsp.<server>.setup(coq.lspensurecapabilities(<stuff...>)) -- after

-- new style vim.lsp.config(<server>, <stuff...>) -- before vim.lsp.config(<server>, coq.lspensurecapabilities(<stuff...>)) -- after vim.lsp.enable(<server>)

Snippets

  • 99% of LSP grammar, 95% of Vim grammar
snippet_norm.img
  • Linked regions
snippet</em>expand.img snip</em>load.img

The % statistic comes from compiling the 10,000 snippets

TreeSitter

  • Shows context
  • Partial document parsing
  • Auto-disable if document is too big
  • Unicode ready
treesitter.img

Treesitter is still unstable in nvim0.5: slow and crash prone

The promise is that Treesitter will have real time parsing on every keystroke, but it's actually too slow on big files.

The Treesitter source only parses a limited number of lines about the cursor and only on Idle events due to unrealized performance promises.

CTags

  • LSP like
  • Incremental & automatic background compilation
  • Non-blocking
ctags.img

Requires Universal CTags, NOT ctags

# MacOS
brew uninstall ctags           # bad
brew install   universal-ctags # good

Ubuntu

apt remove ctags # bad apt install universal-ctags # good

Paths

  • Preview contents
  • $VARIABLE expansion, %EVENUNDERWINDOWS%
  • Relative to both cwd and file path
paths.img

Buffers

  • Real time completion
  • Fast in files with thousands of lines
buffers.img

Registers

  • words Last yank 0 + custom a-z coq_settings.clients.registers.words
  • lines coq_settings.clients.registers.lines (a-z)

Tmux

tmux.img

Modular lua sources & external third party integrations

  • External third party plugins too
repl.img

Shown above: shell repl.

Some other built-ins:

  • nvim lua API
  • vim runtime: ada, c, clojure, css, haskell, html, js, php, syntax

Statistics

:COQ stats

statistics.img

Validating config parser

  • Prevents typos & type errors in your config
Here I make a type error on purpose inputting string instead of an integer.

conf_demo.img

Pretty

pretty.gif

If you can't see icons properly:

Either set let g:coqsettings = { 'display.icons.mode': 'none' } to disable icons, or install a supported font

Install

Vim

Install the usual way, ie. VimPlug, Vundle, etc

" main one
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
" 9000+ Snippets
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}

" lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty " Need to configure separately

Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} " - shell repl " - nvim lua api " - scientific calculator " - comment banner " - etc

Neovim

lazy.nvim

{
  "neovim/nvim-lspconfig", -- REQUIRED: for native Neovim LSP integration
  lazy = false, -- REQUIRED: tell lazy.nvim to start this plugin at startup
  dependencies = {
    -- main one
    { "ms-jpq/coq_nvim", branch = "coq" },

-- 9000+ Snippets { "ms-jpq/coq.artifacts", branch = "artifacts" },

-- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty -- Need to configure separately { 'ms-jpq/coq.thirdparty', branch = "3p" } -- - shell repl -- - nvim lua api -- - scientific calculator -- - comment banner -- - etc }, init = function() vim.g.coq_settings = { -- Your COQ settings here } end, config = function() -- Your LSP settings here end, }

Documentation

FAQ

Default hotkeys?

Always:

| key | function | | ----------- | ----------------- | | <c-space> | manual completion |

When completion menu is open:

| key | function | | ------------- | ----------------- | | <esc> | exit to normal | | <backspace> | backspace | | <enter> | select completion | | <tab> | next result | | <s-tab> | prev result |

For snippet placeholder navigation, bind vim.snippet.jump(Β±1) yourself.

When hovering over a result, entering any key [a-z] will select it. This is a vim thing.

LSP too slow to show up on keystroke.

Increase vim.o.autocompletetimeout. This slows feedback on every keystroke.

Or use manual completion (<c-space>), bounded by vim.o.completetimeout.

LSP sometimes not importing

Increase coqsettings.clients.lsp.resolvetimeout. Applying edits gets slower.

Missing Results

On keystroke only coqsettings.match.maxresults items are shown. Use the manual completion hotkey to see all.

If you like this...

Also check out

  • sad, it's a modern sed that does previews with syntax highlighting, and lets you pick and choose which chunks to edit.
  • CHADTree, it's a FULLY featured file manager.
  • isomorphic-copy, it's a cross platform clipboard that is daemonless, and does not require third party support.

Special Thanks & Acknowledgements

The snippets are compiled from the following open source projects:

Super special thanks goes to Typescript LSP.

Nothing like good motivation to improve my design than dumping 1000 results on my client every other keystroke.

πŸ”— More in this category

Β© 2026 GitRepoTrend Β· ms-jpq/coq_nvim Β· Updated daily from GitHub