FIM Copilot is a lightweight, high-performance VS Code and VSCodium extension for local, private code completion. Powered by Fill-In-The-Middle (FIM) coder models running via Ollama, llama.cpp, or any OpenAI-compatible completion server, it delivers real-time "ghost text" suggestions with zero telemetry and zero cloud dependencies.
- ⚡ Ultra-Low Latency Inline Ghost Text: Integrates directly with VS Code's native
vscode.InlineCompletionItemProviderAPI. PressTabto accept suggestions andEscto dismiss. - 🧠 FIM (Fill-in-the-Middle) Model Support: Pre-configured templates for popular coder models:
qwen(Qwen2.5-Coder 0.5B, 1.5B, 3B, 7B, 14B, 32B)deepseek(DeepSeek-Coder)codellama(CodeLlama)starcoder(StarCoder / StarCoder2)custom(Define your own custom prefix, suffix, and middle delimiter tokens)
- 🔓 Decoupled Configuration: Configure via a simple
.fim-copilot.yamlor.fim-copilot.jsonfile in your workspace root, or globally at~/.config/fim-copilot/config.yaml. - 🚫 Zero Lag & Auto-Cancellation: Built-in request debouncing (~150-200ms) and automatic
AbortControllercancellation to immediately cancel in-flight LLM requests as you keep typing.
Choose your preferred local inference engine:
Pull and run a coder model:
ollama run qwen2.5-coder:1.5bStart llama-server with your GGUF model:
./llama-server \
-m /path/to/qwen2.5-coder-1.5b-instruct-q6_k.gguf \
--device ROCm0 \
-ngl 999 \
-fa on \
-c 4096 \
-np 1 \
--host 0.0.0.0 \
--port 8082Create a configuration file named .fim-copilot.yaml in your project workspace root or at ~/.config/fim-copilot/config.yaml:
enabled: true
# Backend provider: "ollama", "llamacpp", or "openai-compatible"
provider: "llamacpp"
# Target server URL
serverUrl: "http://localhost:8082"
# Model name
model: "qwen2.5-coder-1.5b"
# Typing pause debounce delay in milliseconds
debounceMs: 200
# Limits & Temperature
maxContextTokens: 4096
maxOutputTokens: 64
temperature: 0.2
# FIM format: "qwen", "codellama", "deepseek", "starcoder", or "custom"
fimFormat: "qwen"
# Stop sequences to prevent model runaway generation
stopTokens:
- "\n\n"
- "<|endoftext|>"
- "<|file_sep|>"
- "```"
# Languages to disable auto-completion for
disabledLanguages:
- "plaintext"
- "log"| Setting | Type | Default | Description |
|---|---|---|---|
enabled |
boolean |
true |
Enable or disable auto-completion. |
provider |
string |
"ollama" |
Target server protocol (ollama, llamacpp, or openai-compatible). |
serverUrl |
string |
"http://localhost:11434" |
HTTP endpoint of your local model server. |
model |
string |
"qwen2.5-coder:1.5b" |
Model tag or path identifier. |
debounceMs |
number |
200 |
Typing pause delay before firing LLM request (in ms). |
maxContextTokens |
number |
4096 |
Context window size allocated for prefix and suffix code. |
maxOutputTokens |
number |
64 |
Maximum tokens predicted per inline suggestion. |
temperature |
number |
0.2 |
Generation randomness (0.0 to 0.2 recommended for code). |
fimFormat |
string |
"qwen" |
Delimiter format (qwen, codellama, deepseek, starcoder, custom). |
customFim |
object |
{} |
Custom tokens if fimFormat is set to "custom". |
stopTokens |
array |
[...] |
List of string sequences where generation should stop. |
disabledLanguages |
array |
["plaintext", "log"] |
List of language IDs to ignore. |
Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to run:
FIM Copilot: Toggle Auto-Completion: Instantly pause or resume completion without restarting the editor.FIM Copilot: Reload Configuration: Reload.fim-copilot.yamlor.fim-copilot.jsonon the fly after making edits.
To view extension trace logs in real-time:
- Open the Output panel (
Ctrl + ~-> Output tab). - Select
FIM Copilotfrom the top-right dropdown menu. - Observe live request logs, token generation performance, and model latencies.
MIT License. Free and open source for everyone.