LLM-powered inline autocompletion plugin for Neovim. Focuses on ultra-low-latency via persistent Go daemon with connection keep-alive.
Existing AI completion plugins are slow. The bottleneck is often the HTTP client layer. Complere uses a persistent Go daemon that maintains keep-alive connections, eliminating per-request TLS handshake overhead.
Usable for daily driving. Phases 1-4 complete.
- Ghost text completions with accept (
<C-l>) / dismiss (<C-]>) - Multiline support with auto-indentation
- Debounced triggering in insert mode
- 65% faster HTTP than plenary.curl
- Go 1.21+ (for daemon build)
Build the HTTP daemon:
./scripts/build-daemon.shBinary installs to ~/.local/bin/complere-proxy. Ensure ~/.local/bin is in your PATH.
require('complere').setup({
api_key = 'your-openrouter-key', -- or set OPENROUTER_API_KEY env var
model = 'google/gemini-2.5-flash',
debounce_ms = 1000,
})Commands:
:ComplereEnable— start completion engine:ComplereDisable— stop completion engine:ComplereStatus— show current state:ComplereLogs— open debug log (requiresdebug = true)
{
endpoint = 'https://openrouter.ai/api/v1/chat/completions',
api_key = nil, -- required
debounce_ms = 1000, -- delay before triggering
min_chars = 0, -- min chars before cursor to trigger
context_lines_before = 50, -- lines of context
context_lines_after = 20,
model = 'google/gemini-2.5-flash',
max_tokens = 200,
keymaps = {
accept = '<C-l>',
dismiss = '<C-]>',
},
debug = false, -- enable request/response logging
disabled_filetypes = {}, -- filetypes to skip (e.g., {'markdown' = true})
prompt_slots = { -- section ordering (see below)
top = { 'preamble', 'file_info', 'continuation' },
middle = { 'instructions' },
bottom = { 'full_buffer' },
},
}Prompt sections (assignable to top, middle, bottom slots):
preamble— role and output format rulesfile_info— filename and filetypecontinuation— last 5 lines before cursor (precise completion point)instructions— completion behavior rulesfull_buffer— complete file with cursor markerraw:text— custom text (e.g.,'raw:Be concise')
Completions auto-disable in terminal buffers, command-line windows, and floating windows.
Daemon state directory: ~/.local/state/complere/
# Check if daemon running
cat ~/.local/state/complere/complere-proxy.pid && kill -0 $(cat ~/.local/state/complere/complere-proxy.pid)
# View daemon logs
tail -f ~/.local/state/complere/complere-proxy.log
# Get daemon metrics
kill -USR1 $(cat ~/.local/state/complere/complere-proxy.pid)
# Restart daemon (auto-respawns on next completion)
kill $(cat ~/.local/state/complere/complere-proxy.pid)