RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /How-to
  5. /How to use AI as a pair programmer by setting up real-time code suggestion with Claude in your editor
HOW-TO · DEV

How to use AI as a pair programmer by setting up real-time code suggestion with Claude in your editor

intermediate·15 min·By Fredoline Eruo
Target environment
Ubuntu 24.04 · Ollama 0.4.x
PREREQUISITES

VS Code or JetBrains IDE, Claude API access, basic familiarity with AI coding tools

What this does

This guide covers configuring a Claude-powered extension in VS Code or JetBrains to receive inline code suggestions as code is written. The extension analyzes the current file context and surrounding code to propose completions, refactoring suggestions, and boilerplate generation in real time, reducing the need to switch between an editor and a terminal or chat interface.

Steps

  1. Open the editor's extension marketplace and search for the official Claude extension (e.g., "Claude" by Anthropic). Install it.
  2. Open the extension settings via Preferences > Extensions > Claude Configuration.
  3. Enter the API endpoint URL. For cloud: https://api.anthropic.com/v1/messages. For local Ollama: http://localhost:11434/api/chat.
  4. Set the API key environment variable or enter it directly in the extension configuration field.
  5. Select the model variant (e.g., claude-3-5-sonnet-20240620 for cloud, codellama for Ollama).
  6. Enable inline suggestions: set "Enable Inline Completion" to true and choose a keyboard shortcut for accepting suggestions (default: Tab).
  7. Open a code file and trigger a suggestion by writing a function signature, comment, or partial implementation. Wait 1–2 seconds for the extension to analyze context and propose code.
  8. Press Tab to accept, Escape to dismiss, or modify the suggestion before accepting.

Verification

# Verify extension is loaded in VS Code
code --list-extensions | grep -i claude
# Expected output: anthropic.claude-code or similar official extension identifier

Common failures

  1. API key not recognized: Extension shows "Authentication failed" and no suggestions appear. Solution: confirm the API key is valid, environment variable is set in the shell before launching the editor, and no trailing whitespace is present in the key string.
  2. Suggestions timeout or hang: The extension spinner appears but never resolves. Solution: check network connectivity to the API endpoint with curl -s -o /dev/null -w "%{http_code}" <endpoint>. If using Ollama, verify the service is running with curl http://localhost:11434/api/tags.
  3. Inline suggestion overrides cursor unexpectedly: Pressing Tab to accept breaks indentation or moves the cursor to the wrong position. Solution: in extension settings, map the accept action to a custom shortcut (e.g., Ctrl+Shift+Enter) rather than Tab to avoid conflicts with standard editor behavior.
  4. Context window too short for large files: Suggestions are poor or generic because the extension only sends the visible viewport. Solution: open the file in a focused state or increase the token context limit in extension settings.

Related guides

  • How to delegate specific file tasks to an AI pair programmer while you focus on architecture
  • How to review AI pair programming suggestions for security vulnerabilities before accepting them
← All how-to guidesCourses →