How to set up Continue.dev for local AI code completions

Continue is an open-source VS Code and JetBrains extension that adds AI code completions and chat using local or cloud models. This guide covers installation, configuring Ollama as the backend, and effective usage patterns.

Why Continue over Copilot

Continue is fully open-source, works with any LLMLLMLarge Language Model — a neural network trained on vast amounts of text data that can understand and generate human-quality language across a wide range of tasks.Learn more → (local or cloud), and gives you complete control over what data is sent where. For organisations with strict data policies, using Continue with a local Ollama backend means your code never leaves your network.

Continue also supports a richer context system than Copilot: you can reference specific files, documentation URLs, and terminal output in your chat queries using @ mentions, giving the model better context for complex refactors.

Install Continue

Install the Continue extension from the VS Code marketplace (search 'Continue'). For JetBrains IDEs, install from the JetBrains Marketplace. After installation, a Continue sidebar panel will appear. Click 'Configure' to open the configuration file.

Continue stores its config at `~/.continue/config.json`. This file controls which models are used for chat, completions, and embeddingEmbeddingA numerical vector representation of text, code, or images that captures semantic meaning — similar items have similar vectors, enabling search, clustering, and retrieval.Learn more →. All configuration changes take effect immediately — no IDE restart needed.

Configure Ollama as the backend

Ensure Ollama is running (`ollama serve`) and pull a capable chat model: `ollama pull qwen2.5-coder:14b`. For autocomplete (fill-in-the-middle), pull a dedicated completion model: `ollama pull qwen2.5-coder:3b`. Smaller models are better for completions because they need to be fast.

Add to your `config.json`: `{"models": [{"title": "Qwen 2.5 Coder 14B", "provider": "ollama", "model": "qwen2.5-coder:14b"}], "tabAutocompleteModel": {"title": "Qwen 2.5 Coder 3B", "provider": "ollama", "model": "qwen2.5-coder:3b"}}`.

Use the chat panel effectively

Open the Continue chat with Cmd+M (macOS) or Ctrl+M. Type your question or request. Use @ mentions to add context: `@file` to reference a specific file, `@codebase` to search your indexed codebase, `@terminal` to include recent terminal output, `@url` to fetch documentation.

Highlight code in the editor and press Cmd+Shift+M to add the selection as context. Then describe what you want: 'Refactor this to use async/await' or 'Add error handling for network failures'. Continue will apply the changes directly to the file.

Index your codebase for smarter context

Continue can index your codebase using embeddings so it can find relevant code when you ask questions. Configure an embedding modelEmbedding ModelA specialized neural network that converts text into high-dimensional vectors, enabling semantic search, clustering, and retrieval applications.Learn more → in `config.json`: `"embeddingsProvider": {"provider": "ollama", "model": "nomic-embed-text"}`. Pull the embedding model: `ollama pull nomic-embed-text`.

Once indexed, `@codebase` searches across all your files semantically — not just by filename. Ask 'Where is the authentication logic?' and Continue will find the relevant functions even if they are spread across multiple files.