Status: π§ Phase 1 Complete - HTTP Client & Core UI Implemented
AI code assistant for Neovim - a lightweight HTTP client for Continue CLI.
Instead of porting the entire Continue codebase (40-70K tokens of TypeScript), continue.nvim is a thin HTTP client that connects to cn serve (the Continue CLI backend).
Benefits:
- π 90% less code - Only ~5K tokens of Lua
- π Always up-to-date -
npm update @continuedev/cligets latest features - π― Same behavior - Identical to Continue CLI (no divergence)
- π οΈ All features - Agent, Chat, Tools, MCP - everything Continue offers
HTTP Client & Infrastructure:
- HTTP Client - curl-based async requests with timeout handling
- Process Manager - Auto-start/stop
cn servewith port scanning - State Polling - Dynamic intervals (100ms active, 1s idle)
- Chat UI - Split window with input area (80% chat, 20% input)
- Message Formatting - User/Assistant/System/Tool messages
- Streaming Support - Character-by-character real-time updates
- Permission System - Interactive tool approval prompts
- State Diffing - Efficient UI updates (only render changes)
Polish & UX:
- Syntax Highlighting - Code blocks with language-aware highlighting
- Message Copying - yy (current), yA (all) to clipboard
- Keyboard Help - Press ? for interactive help
- Processing Indicator - Real-time status (β³/π₯/β ) in header
- Request Retry - Auto-retry transient failures (2x max)
- Welcome Screen - Beautiful ASCII art and quick start
- Export to Markdown - :ContinueExport command
Autocomplete Systems:
-
Slash Command Autocomplete - Fuzzy-finding preview for /commands
- Real-time filtering as you type
- Keyboard navigation (β/β, Tab)
- 16 system commands + custom commands support
- Visual indicators (β system, π€ custom)
-
File Attachment Picker - Git-aware fuzzy finder for @mentions
- Fuzzy matching on filenames and paths
- Multi-select support (attach multiple files)
- Keyboard navigation (β/β, Tab)
- Visual indicators for attached files
Search & Navigation:
-
Vim-Style Search - Search chat history with /, n, N
- Real-time search with match highlighting
- Jump between matches (n/N)
- Match counter (e.g., "Match 3 of 12")
- Clear highlights with
-
Code Block Navigation - Jump between code blocks
- ]c / [c to navigate blocks
- Language detection from fences
Code Operations:
- Code Block Extraction - One-key operations on code blocks
- yc to yank (copy) code block at cursor
- ]c / [c to jump between blocks
- ce to execute (Lua, Vim, Bash, Python)
- cw to write block to file
Enhanced UI:
-
Help Overlay - Comprehensive keyboard reference (g?)
- Full-screen help with all keybindings
- Syntax-highlighted sections
- Tips & tricks
- Architecture overview
-
Local Command Handlers - Instant execution of common commands
- /clear - Clear history (with confirmation)
- /help - Show help overlay
- /exit - Close chat window
Commands:
-
:Continue [msg]- Open chat or send message -
:ContinueStart/Stop- Server management -
:ContinuePause- Interrupt agent -
:ContinueStatus- Show status -
:ContinueDiff- Show git diff -
:ContinueHealth- Dependency check -
:ContinueExport [file]- Export to markdown
- Treesitter integration (enhanced syntax highlighting)
- Session persistence (save/restore across restarts)
- Visual mode operations (send selection)
- Mode indicators (normal/plan/auto from CLI)
- Custom command loading from server
- Neovim 0.10+ (for
vim.jsonbuilt-in) - Node.js 18+ (for Continue CLI)
- curl (for HTTP requests)
npm install -g @continuedev/clicn initUsing lazy.nvim:
{
'continue.nvim',
dev = true, -- For local development
config = function()
require('continue').setup({
port = 8000, -- Default port for cn serve
port_range = { 8000, 8010 }, -- Auto-find available port
timeout = 300, -- Server timeout (seconds)
auto_start = false, -- DEPRECATED: server starts lazily on first command
auto_find_port = true, -- Find available port automatically
cn_bin = 'cn', -- Path to cn binary
continue_config = nil, -- Path to Continue config (optional)
})
end,
}Using packer.nvim:
use {
'continue.nvim',
config = function()
require('continue').setup()
end
}All configuration options with defaults:
require('continue').setup({
port = 8000, -- Default port for cn serve
port_range = { 8000, 8010 }, -- Range for auto port finding
timeout = 300, -- Server auto-shutdown timeout (seconds)
auto_start = false, -- DEPRECATED: server now starts lazily on first command
auto_find_port = true, -- Automatically find available port
cn_bin = 'cn', -- Path to cn CLI binary
continue_config = nil, -- Custom Continue config path (optional)
-- Terminal window configuration
terminal = {
position = 'float', -- 'float', 'left', 'right', 'top', 'bottom'
hsize = 80, -- Horizontal size in % (for float/left/right)
vsize = 80, -- Vertical size in % (for float/top/bottom)
transparency = 0, -- Transparency 0-100 (only for float, requires nvim 0.9+)
},
})float(default): Centered floating window with configurable transparencyleft: Vertical split on the left sideright: Vertical split on the right sidetop: Horizontal split at the topbottom: Horizontal split at the bottom
Note: AI provider configuration (API keys, models) is handled by Continue CLI, not this plugin. Configure via ~/.continue/config.json or environment variables. See Continue docs.
" Open chat window
:Continue
" Send a message directly
:Continue How do I implement a binary search in Rust?
" Check health status
:ContinueHealth| Command | Description |
|---|---|
:Continue [message] |
Open chat or send message directly (auto-starts server) |
:ContinueStart |
Manually start cn serve if needed |
:ContinueStop |
Stop server and polling |
:ContinuePause |
Interrupt current agent execution (like Ctrl+C) |
:ContinueStatus |
Show server and client status |
:ContinueDiff |
Show git diff in split window |
:ContinueHealth |
Run health check (dependencies + server) |
| Key | Action |
|---|---|
q or <Esc> |
Close chat window |
g? |
Show comprehensive help overlay |
yy |
Copy current message to clipboard |
yA |
Copy all messages to clipboard |
/ |
Search in chat history (vim-style) |
n |
Jump to next search match |
N |
Jump to previous search match |
<C-l> |
Clear search highlights |
Code Block Operations:
| Key | Action |
|---|---|
yc |
Yank (copy) code block at cursor |
]c |
Jump to next code block |
[c |
Jump to previous code block |
<leader>ce |
Execute code block (Lua/Vim/Bash/Python) |
<leader>cw |
Write code block to file |
Input Area:
| Key | Action |
|---|---|
i or a |
Start typing (insert mode) |
<CR> |
Send message |
/command |
Trigger slash command autocomplete |
@filename |
Trigger file picker autocomplete |
β / β |
Navigate autocomplete suggestions |
Tab |
Complete/select suggestion |
<Esc> |
Cancel/hide suggestions |
Window Resizing:
| Key | Action |
|---|---|
<C-w>+ |
Increase window height |
<C-w>- |
Decrease window height |
<C-w>> |
Increase window width |
<C-w>< |
Decrease window width |
<C-w>= |
Reset window to default size |
Note: Resize keybindings work in both floating and split window modes.
Start Continue server:
cn serve --port 8000Run integration tests in Neovim:
:luafile tests/test_http_client.lua:ContinueHealthExample output:
=== Continue.nvim Health Check ===
β Neovim version: 0.10 (OK)
β Node.js: v20.11.0
β Continue CLI: 0.1.0 (/usr/local/bin/cn)
β curl: available
β Server: running on port 8000
β Server health: OK
βββββββββββββββββββββββββββββββββββ
β Neovim β
β ββββββββββββββββββββββββββββ β
β β continue.nvim β β
β β (Lua - ~8K tokens) β β
β β β β HTTP/JSON
β β β’ HTTP client βββββΌβββββββββ
β β β’ State polling β β β
β β β’ UI rendering β β β
β β β’ Commands β β β
β ββββββββββββββββββββββββββββ β β
βββββββββββββββββββββββββββββββββββ β
βΌ
βββββββββββββββββββ
β cn serve β
β (Node.js/TS) β
β β
β β’ Agent logic β
β β’ LLM APIs β
β β’ Tools/MCP β
β β’ All Continue β
β features β
βββββββββββββββββββ
lua/continue/
βββ init.lua # Entry point & setup()
βββ client.lua # HTTP client (endpoints, polling)
βββ process.lua # cn serve lifecycle management
βββ commands.lua # User commands (:Continue, etc.)
βββ ui/
β βββ chat.lua # Chat window & message rendering
βββ utils/
βββ http.lua # curl wrapper (async HTTP)
βββ json.lua # vim.json wrapper
tests/
βββ test_http_client.lua # Integration tests
The plugin communicates with cn serve via REST API:
GET /state- Poll for chat state (every 500ms)POST /message- Send user messagePOST /permission- Approve/reject tool executionPOST /pause- Interrupt agentGET /diff- Get git diffPOST /exit- Graceful shutdown
See source/extensions/cli/spec/wire-format.md for full protocol spec.
This project is in early development. Contributions are welcome once the core architecture is stable.
Apache 2.0 Β© 2023-2025 Continue Dev, Inc.
Original Continue extension: https://github.com/continuedev/continue
- Continue VSCode Extension - The original
- copilot.vim - GitHub Copilot for Vim/Neovim
- codeium.vim - Codeium AI for Vim
- π Documentation: docs/
- π Issues: GitHub Issues (when ready)
- π¬ Discussions: GitHub Discussions (when ready)