IDE Plugins
Integrate Claude Code directly into your favorite code editor
title: IDE Plugins description: Integrate Claude Code directly into your favorite code editor
Claude Code offers native integration with popular IDEs, bringing AI-powered coding assistance directly into your development environment. This guide covers installation and configuration for each supported editor.
VS Code Extension
Installation
- Open VS Code
- Go to Extensions (Cmd/Ctrl + Shift + X)
- Search for "Claude Code"
- Click Install
Or install from the command line:
code --install-extension anthropic.claude-code
Setup
After installation:
- Open the Command Palette (Cmd/Ctrl + Shift + P)
- Type "Claude: Sign In"
- Follow the authentication prompts
Features
| Feature | Shortcut | Description | |---------|----------|-------------| | Inline Chat | Cmd/Ctrl + I | Chat with Claude about selected code | | Code Actions | Cmd/Ctrl + . | Quick fixes and refactoring suggestions | | Generate Code | Cmd/Ctrl + Shift + G | Generate code from natural language | | Explain Code | Cmd/Ctrl + Shift + E | Get explanations for selected code | | Find Bugs | Cmd/Ctrl + Shift + B | Analyze code for potential issues |
Configuration
Open settings (Cmd/Ctrl + ,) and search for "Claude":
{
"claude.model": "claude-sonnet-4-20250514",
"claude.maxTokens": 4096,
"claude.temperature": 0,
"claude.showInlineHints": true,
"claude.autoComplete": true,
"claude.codeActions": true
}
Inline Chat
Select code and press Cmd/Ctrl + I to open inline chat:
Selected code: function calculateTotal(items) { ... }
You: Add input validation and handle edge cases
Claude: [Provides improved code with validation]
Code Lens
Claude adds CodeLens hints above functions:
// π‘ Explain | π§ Improve | π§ͺ Test
function processOrder(order: Order): Result {
// ...
}
Click any hint to get Claude's assistance.
Panel View
Open the Claude panel for longer conversations:
- Click the Claude icon in the Activity Bar
- Or use Cmd/Ctrl + Shift + C
The panel supports:
- Multi-turn conversations
- File references (@file)
- Code generation with preview
- Conversation history
JetBrains Plugins
Supported IDEs
- IntelliJ IDEA
- WebStorm
- PyCharm
- PhpStorm
- GoLand
- RubyMine
- Rider
- CLion
- DataGrip
Installation
- Open Settings/Preferences (Cmd/Ctrl + ,)
- Go to Plugins β Marketplace
- Search for "Claude Code"
- Click Install and restart IDE
Or install from JetBrains Marketplace:
https://plugins.jetbrains.com/plugin/claude-code
Setup
- Go to Settings β Tools β Claude Code
- Enter your API key or sign in
- Configure default model and preferences
Features
| Feature | Shortcut | Description | |---------|----------|-------------| | Ask Claude | Alt + C | Open Claude chat for selection | | Generate | Alt + G | Generate code from description | | Refactor | Alt + R | AI-powered refactoring | | Document | Alt + D | Generate documentation | | Test | Alt + T | Generate unit tests |
Tool Windows
Claude appears in two locations:
- Right Panel - Quick chat for selected code
- Bottom Panel - Full conversation interface
Intentions
Right-click on code to see Claude intentions:
- "Ask Claude about this"
- "Explain this code"
- "Generate tests for this"
- "Find potential bugs"
- "Suggest improvements"
Configuration
Settings β Tools β Claude Code
Model: claude-sonnet-4-20250514
Max Tokens: 4096
Include Context: β Current file β Open files β Project structure
Auto-suggestions: β Enabled
Neovim Integration
Installation
Using lazy.nvim:
{
'anthropics/claude.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
},
config = function()
require('claude').setup({
api_key = vim.env.ANTHROPIC_API_KEY,
model = 'claude-sonnet-4-20250514',
})
end
}
Using packer.nvim:
use {
'anthropics/claude.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('claude').setup()
end
}
Setup
Add your API key to your shell configuration:
export ANTHROPIC_API_KEY="sk-ant-api03-..."
Key Mappings
Default mappings (customizable):
vim.keymap.set('n', '<leader>cc', ':ClaudeChat<CR>')
vim.keymap.set('v', '<leader>ce', ':ClaudeExplain<CR>')
vim.keymap.set('v', '<leader>cr', ':ClaudeRefactor<CR>')
vim.keymap.set('v', '<leader>ct', ':ClaudeTest<CR>')
vim.keymap.set('n', '<leader>cg', ':ClaudeGenerate<CR>')
Commands
| Command | Description |
|---------|-------------|
| :ClaudeChat | Open chat window |
| :ClaudeExplain | Explain selected code |
| :ClaudeRefactor | Refactor selected code |
| :ClaudeTest | Generate tests |
| :ClaudeGenerate | Generate code from prompt |
| :ClaudeFix | Fix errors in code |
Configuration
require('claude').setup({
api_key = vim.env.ANTHROPIC_API_KEY,
model = 'claude-sonnet-4-20250514',
max_tokens = 4096,
temperature = 0,
-- UI options
window = {
position = 'right', -- 'right', 'left', 'bottom', 'float'
width = 80,
border = 'rounded',
},
-- Keymaps
keymaps = {
chat = '<leader>cc',
explain = '<leader>ce',
refactor = '<leader>cr',
test = '<leader>ct',
generate = '<leader>cg',
},
-- Include context
context = {
current_file = true,
cursor_context = 50, -- lines around cursor
lsp_diagnostics = true,
},
})
Telescope Integration
If you use Telescope:
require('telescope').load_extension('claude')
vim.keymap.set('n', '<leader>ch', ':Telescope claude history<CR>')
vim.keymap.set('n', '<leader>cp', ':Telescope claude prompts<CR>')
Sublime Text
Installation
- Install Package Control if not present
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Type "Package Control: Install Package"
- Search for "Claude" and install
Configuration
Create or edit Packages/User/Claude.sublime-settings:
{
"api_key": "sk-ant-api03-...",
"model": "claude-sonnet-4-20250514",
"max_tokens": 4096,
"show_in_panel": true
}
Commands
Access via Command Palette or keyboard shortcuts:
Claude: Ask- Ask about selectionClaude: Explain- Explain codeClaude: Generate- Generate codeClaude: Refactor- Suggest improvements
Emacs
Installation
Using straight.el:
(straight-use-package
'(claude :type git :host github :repo "anthropics/claude.el"))
(require 'claude)
(setq claude-api-key (getenv "ANTHROPIC_API_KEY"))
Using use-package:
(use-package claude
:straight (:host github :repo "anthropics/claude.el")
:config
(setq claude-api-key (getenv "ANTHROPIC_API_KEY"))
(setq claude-model "claude-sonnet-4-20250514"))
Key Bindings
(global-set-key (kbd "C-c c c") 'claude-chat)
(global-set-key (kbd "C-c c e") 'claude-explain-region)
(global-set-key (kbd "C-c c r") 'claude-refactor-region)
(global-set-key (kbd "C-c c g") 'claude-generate)
Common Configuration
Shared Settings
All IDE plugins support these common settings:
| Setting | Description | Default |
|---------|-------------|---------|
| model | Claude model to use | claude-sonnet-4-20250514 |
| maxTokens | Maximum response length | 4096 |
| temperature | Response randomness (0-1) | 0 |
| apiKey | Your Anthropic API key | - |
Context Settings
Control what context is sent to Claude:
- Current file - Include the active file
- Selection - Include selected text
- Open files - Include other open files
- Project structure - Include file tree
- Git context - Include recent changes
Privacy Settings
Some plugins offer privacy controls:
- Exclude specific files/patterns
- Disable telemetry
- Local processing options
Troubleshooting
Extension Not Loading
- Check VS Code/IDE version compatibility
- Restart the IDE
- Check extension logs for errors
- Reinstall the extension
Authentication Issues
- Verify API key is correct
- Check key hasn't expired
- Ensure network connectivity
- Try signing out and back in
Slow Responses
- Check network connection
- Try a different model (Haiku is faster)
- Reduce context settings
- Check rate limits
No Code Suggestions
- Verify auto-complete is enabled
- Check file type is supported
- Ensure cursor is in valid position
- Check extension settings
Best Practices
1. Use Specific Selections
Select specific code rather than entire files:
// β
Good: Select just this function
function processData(data: Data): Result {
// ...
}
// β Avoid: Selecting the entire 500-line file
2. Provide Context in Prompts
Be specific about what you need:
β "Fix this"
β
"Fix the null pointer exception when items array is empty"
3. Review Generated Code
Always review Claude's suggestions before accepting:
- Check for correctness
- Verify it matches your style guide
- Test the changes
4. Use Keyboard Shortcuts
Learn the shortcuts for your most common operations to stay in flow.