Skip to main content
Inline ghost text code suggestions powered by Claude, similar to GitHub Copilot or Supermaven. Routes completions through the 0x0 server, which calls the Anthropic API on your behalf. Uses claude-haiku-4-5-20251001 by default for fast time-to-first-token (~200-400ms).

Requirements

  • Neovim >= 0.10
  • curl in PATH
  • 0x0.nvim plugin installed and configured
  • ANTHROPIC_API_KEY environment variable (or configured in 0x0 config)

Installation

lazy.nvim

{
  "anonymous-dev-org/0x0-completion.nvim",
  dependencies = { "0x0.nvim" },
  event = "InsertEnter",
  opts = {},
}

packer.nvim

use {
  "anonymous-dev-org/0x0-completion.nvim",
  requires = { "anonymous-dev-org/0x0.nvim" },
  config = function()
    require("zeroxzero-completion").setup()
  end,
}

Configuration

All options and their defaults:
require("zeroxzero-completion").setup({
  model = "claude-haiku-4-5-20251001",       -- model for completions
  max_tokens = 256,                          -- max completion length
  debounce_ms = 150,                         -- wait before requesting
  max_prefix_lines = 100,                    -- context before cursor
  max_suffix_lines = 50,                     -- context after cursor
  cache_size = 64,                           -- LRU cache entries
  disabled_filetypes = {                     -- skip these filetypes
    TelescopePrompt = true,
    NvimTree = true,
    lazy = true,
    mason = true,
    help = true,
    [""] = true,
  },
  keymaps = {
    accept = "<Tab>",                        -- accept full completion
    dismiss = "<C-]>",                       -- dismiss ghost text
    accept_word = "<M-w>",                   -- accept first word
    accept_line = "<M-l>",                   -- accept first line
    toggle = "<M-Bslash>",                   -- toggle on/off (normal mode)
  },
})

Keymaps

All keymaps are configurable via the keymaps option.
KeymapModeAction
<Tab>iAccept the full completion (falls through when no ghost text)
<C-]>iDismiss the current ghost text
<M-w>iAccept the first word
<M-l>iAccept the first line
<M-\>nToggle completions on/off

Commands

CommandDescription
:ZeroCompletionToggleToggle autocompletion on or off
:ZeroCompletionClearClear the current ghost text

How it works

  1. Monitors TextChangedI events for cursor position changes
  2. Extracts prefix and suffix context with language detection (20+ languages)
  3. Debounces requests (150ms by default) to avoid flooding
  4. Streams completions via the 0x0 server’s /completion endpoint
  5. Renders ghost text using Neovim extmarks with overlay positioning
  6. Caches results in an LRU cache to avoid duplicate requests

Health check

:checkhealth zeroxzero-completion

See also

  • Neovim — main 0x0 Neovim plugin
  • Providers — configure LLM providers and API keys