IDE Integration (VS Code / Cursor Patterns)
Configure your IDE for optimal AI-assisted development with keyboard shortcuts, extensions, and workflows.
What you'll accomplish
Set up your IDE with effective AI integration patterns and keyboard shortcuts.
Prerequisites
- VS Code or Cursor installed
- Basic IDE familiarity
IDE Options for AI Development
| IDE | Best For | AI Integration |
|---|---|---|
| VS Code + Extensions | Flexible, open ecosystem | Copilot, Continue, etc. |
| Cursor | AI-first development | Built-in Claude/GPT |
| Zed | Performance-focused | Built-in AI features |
Note
This guide focuses on VS Code and Cursor patterns, as they're the most widely used. The principles apply to other editors.
VS Code Setup
Recommended Extensions
Install these extensions for AI-assisted development:
json{ "recommendations": [ "github.copilot", "continue.continue", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "bradlc.vscode-tailwindcss" ] }
Save as .vscode/extensions.json in your repo.
Settings for AI Development
json{ "editor.inlineSuggest.enabled": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, "files.autoSave": "onFocusChange", "git.autofetch": true }
Cursor Setup
Cursor has AI built-in. Configure it for professional use:
.cursorrules File
Cursor Rules
Repository-specific Cursor configuration
# Cursor Rules for This Project ## Code Style - Use TypeScript strict mode - Prefer functional components - Use named exports ## Constraints - No console.log in production code - All functions need JSDoc comments - Maximum file length: 300 lines ## Testing - Every new function needs a test - Use describe/it pattern - Mock external dependencies ## Off-Limits - Do not modify: package-lock.json - Do not run: rm -rf, git push --force
Keyboard Shortcuts
Set up efficient shortcuts for AI interactions:
Effective Prompting in IDE
Inline Prompts (Ctrl+K / Cmd+K)
For quick, focused changes:
// Bad: Too vague
add validation
// Good: Specific and constrained
add email validation using regex, return boolean
Chat Prompts
For larger explanations or multi-file work:
IDE Chat Pattern
Structured prompt for IDE AI chat
Looking at {{file}}: Goal: {{goal}} Questions: 1. What's the best approach given existing patterns? 2. Are there edge cases I should handle? 3. What tests should I add?
Context Management
Including Context
Most AI integrations let you reference files:
@file.ts- Reference a specific file@folder/- Reference a directory@selection- Reference selected code
Excluding Noise
Keep context focused:
- Don't include unrelated files
- Reference specific functions, not whole files
- Clear chat history when switching tasks
Multi-File Operations
For changes across multiple files:
- Plan first - Use chat to outline the approach
- One file at a time - Apply changes incrementally
- Test between changes - Don't batch too much
- Commit checkpoints - Small commits for rollback
Terminal Integration
For AI CLI tools (Claude Code, aider):
json{ "terminal.integrated.defaultProfile.linux": "bash", "terminal.integrated.defaultProfile.osx": "zsh", "terminal.integrated.defaultProfile.windows": "PowerShell" }
Tip
Run AI CLI tools in the integrated terminal so you can quickly reference files and see changes in the editor.
Workspace Settings
Save project-specific AI settings:
json// .vscode/settings.json { "editor.defaultFormatter": "esbenp.prettier-vscode", "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "github.copilot.enable": { "*": true, "plaintext": false, "markdown": true } }
Verify
Your IDE is properly configured if:
- AI suggestions appear inline as you type
- You can open AI chat with a keyboard shortcut
- Format-on-save is working
- You have .cursorrules or equivalent
Next: Learn about MCP (Model Context Protocol) and Skills architecture for advanced integrations.