Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>FIM Copilot (Local LLM)New to Visual Studio Code? Get it now.
FIM Copilot (Local LLM)

FIM Copilot (Local LLM)

Anang Phatak

|
1 install
| (0) | Free
Fast, private local code completion using Ollama, llama.cpp, or OpenAI FIM endpoints
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FIM Copilot (Local LLM)

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.


✨ Features

  • ⚡ Ultra-Low Latency Inline Ghost Text: Integrates directly with VS Code's native vscode.InlineCompletionItemProvider API. Press Tab to accept suggestions and Esc to 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.yaml or .fim-copilot.json file in your workspace root, or globally at ~/.config/fim-copilot/config.yaml.
  • 🚫 Zero Lag & Auto-Cancellation: Built-in request debouncing (~150-200ms) and automatic AbortController cancellation to immediately cancel in-flight LLM requests as you keep typing.

🚀 Quick Start

1. Run a Local LLM Server

Choose your preferred local inference engine:

Option A: Ollama

Pull and run a coder model:

ollama run qwen2.5-coder:1.5b

Option B: llama.cpp (llama-server)

Start 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 8082

2. Configure FIM Copilot

Create 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"

⚙️ Configuration File Options

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.

⌨️ Extension Commands

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.yaml or .fim-copilot.json on the fly after making edits.

📋 Troubleshooting & Output Logs

To view extension trace logs in real-time:

  1. Open the Output panel (Ctrl + ~ -> Output tab).
  2. Select FIM Copilot from the top-right dropdown menu.
  3. Observe live request logs, token generation performance, and model latencies.

📄 License

MIT License. Free and open source for everyone.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft