-
Notifications
You must be signed in to change notification settings - Fork 0
VS Code Extension
Status: ✅ Complete
Phase: Phase 2
Last Updated: December 9, 2025
The RiceCoder VS Code extension provides native integration with VS Code, enabling seamless access to ricecoder's AI-powered features directly in the editor. The extension communicates with ricecoder via JSON-RPC protocol and provides completion, diagnostics, hover information, and definition navigation.
- VS Code 1.60 or later
- RiceCoder installed and running
- Node.js 14+ (for development)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "RiceCoder"
- Click Install
- Reload VS Code
-
Clone the ricecoder repository:
git clone https://github.com/moabualruz/ricecoder.git cd ricecoder/projects/ricecoder/extensions/vscode -
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Install in VS Code:
npm run install-extension
The extension reads configuration from VS Code settings. Open settings (Ctrl+, / Cmd+,) and search for "ricecoder":
{
"ricecoder.enabled": true,
"ricecoder.port": 8080,
"ricecoder.host": "localhost",
"ricecoder.timeout": 5000,
"ricecoder.maxResults": 50,
"ricecoder.features": {
"completion": true,
"diagnostics": true,
"hover": true,
"definition": true
}
}Intelligent code completion suggestions powered by external LSP servers.
How to Use:
- Automatic: Completions appear automatically as you type
- Manual: Press Ctrl+Space (Cmd+Space on Mac) to trigger completion
- Select: Use arrow keys to navigate, Enter to select
- Dismiss: Press Escape to dismiss
Features:
- Snippet expansion with tab stops
- Type information and documentation
- Sorting by relevance
- Fallback to generic completion if LSP unavailable
Example:
// Type: fn
// Completions appear:
// - fn (keyword)
// - function_name (from LSP)
// - for_each (from LSP)Real-time error and warning detection.
How to Use:
- Errors and warnings appear inline in the editor
- View all diagnostics in the Problems panel (Ctrl+Shift+M / Cmd+Shift+M)
- Click on diagnostic to navigate to issue
- Hover over diagnostic for details
Features:
- Error/warning/info levels
- Quick fixes (when available)
- Inline code actions
- Diagnostic filtering
Example:
let x: i32 = "string"; // Error: mismatched types
// Quick fix: Remove type annotationSymbol information on hover.
How to Use:
- Hover over any symbol to see information
- Click on links in hover to navigate
- Press Escape to dismiss
Features:
- Type information
- Documentation
- Source location
- Related symbols
Example:
let result = vec![1, 2, 3];
// Hover shows: Vec<i32>
// Documentation: A growable array typeNavigate to symbol definitions.
How to Use:
- Go to Definition: F12 or Ctrl+Click
- Peek Definition: Ctrl+Shift+F10 or Alt+Click
- Go to References: Shift+F12
- Back: Alt+Left Arrow
Features:
- Jump to definition in same or different file
- Peek definition without leaving current file
- Find all references
- Navigation history
Example:
let x = my_function(); // F12 to jump to my_function definitionAccess ricecoder commands from the command palette.
How to Use:
- Press Ctrl+Shift+P (Cmd+Shift+P on Mac)
- Type "RiceCoder" to see available commands
- Select command to execute
Available Commands:
-
RiceCoder: Start- Start ricecoder -
RiceCoder: Stop- Stop ricecoder -
RiceCoder: Restart- Restart ricecoder -
RiceCoder: Show Status- Show connection status -
RiceCoder: Open Settings- Open ricecoder settings -
RiceCoder: Run Chat- Open chat interface -
RiceCoder: Generate Code- Generate code -
RiceCoder: Review Code- Review current file
| Setting | Type | Default | Description |
|---|---|---|---|
ricecoder.enabled |
boolean | true | Enable/disable extension |
ricecoder.host |
string | localhost | RiceCoder host |
ricecoder.port |
number | 8080 | RiceCoder port |
ricecoder.timeout |
number | 5000 | Request timeout (ms) |
ricecoder.maxResults |
number | 50 | Max completion results |
| Setting | Type | Default | Description |
|---|---|---|---|
ricecoder.features.completion |
boolean | true | Enable code completion |
ricecoder.features.diagnostics |
boolean | true | Enable diagnostics |
ricecoder.features.hover |
boolean | true | Enable hover info |
ricecoder.features.definition |
boolean | true | Enable definition nav |
| Setting | Type | Default | Description |
|---|---|---|---|
ricecoder.debug |
boolean | false | Enable debug logging |
ricecoder.logLevel |
string | info | Log level (debug/info/warn/error) |
ricecoder.autoConnect |
boolean | true | Auto-connect on startup |
ricecoder.reconnectAttempts |
number | 5 | Max reconnection attempts |
ricecoder.reconnectDelay |
number | 1000 | Delay between reconnects (ms) |
Configure settings per language:
{
"[rust]": {
"ricecoder.features.completion": true,
"ricecoder.timeout": 10000
},
"[typescript]": {
"ricecoder.features.completion": true,
"ricecoder.timeout": 5000
},
"[python]": {
"ricecoder.features.completion": true,
"ricecoder.timeout": 8000
}
}| Shortcut | Command | Platform |
|---|---|---|
| Ctrl+Space | Trigger Completion | Windows/Linux |
| Cmd+Space | Trigger Completion | Mac |
| F12 | Go to Definition | All |
| Ctrl+Shift+F10 | Peek Definition | Windows/Linux |
| Cmd+Shift+F10 | Peek Definition | Mac |
| Shift+F12 | Find References | All |
| Ctrl+Shift+M | Show Problems | Windows/Linux |
| Cmd+Shift+M | Show Problems | Mac |
To customize shortcuts, open keyboard shortcuts (Ctrl+K Ctrl+S / Cmd+K Cmd+S) and search for "ricecoder":
[
{
"key": "ctrl+alt+c",
"command": "ricecoder.triggerCompletion"
},
{
"key": "ctrl+alt+d",
"command": "ricecoder.goToDefinition"
}
]Problem: "Failed to connect to RiceCoder"
Solutions:
-
Verify ricecoder is running:
ricecoder --version ricecoder start
-
Check port configuration:
- Default port is 8080
- Verify port is not in use:
netstat -an | grep 8080 - Change port in settings if needed
-
Check firewall:
- Ensure firewall allows localhost connections
- Try connecting from terminal:
curl http://localhost:8080/health
-
Check extension logs:
- Open Output panel (Ctrl+Shift+U / Cmd+Shift+U)
- Select "RiceCoder" from dropdown
- Look for error messages
-
Restart extension:
- Reload VS Code (Ctrl+Shift+P, "Reload Window")
- Or restart VS Code completely
Problem: Code completions are not showing
Solutions:
-
Verify completion is enabled:
- Check
ricecoder.features.completionis true - Check
ricecoder.enabledis true
- Check
-
Check LSP server:
- Verify LSP server is running for your language
- Check ricecoder logs for LSP errors
-
Try manual trigger:
- Press Ctrl+Space to manually trigger completion
- If manual works, automatic trigger may be disabled
-
Check file type:
- Ensure file has correct language mode
- Click language indicator (bottom right) to change
-
Increase timeout:
- LSP server may be slow
- Increase
ricecoder.timeoutin settings
Problem: Errors and warnings are not displayed
Solutions:
-
Verify diagnostics are enabled:
- Check
ricecoder.features.diagnosticsis true - Check
ricecoder.enabledis true
- Check
-
Check Problems panel:
- Open Problems panel (Ctrl+Shift+M / Cmd+Shift+M)
- Look for diagnostics there
-
Check file type:
- Ensure file has correct language mode
- Diagnostics may not be available for all languages
-
Check LSP server:
- Verify LSP server is running
- Check ricecoder logs for errors
-
Disable and re-enable:
- Set
ricecoder.enabledto false - Set
ricecoder.enabledto true - Reload window
- Set
Problem: Hover tooltips are not appearing
Solutions:
-
Verify hover is enabled:
- Check
ricecoder.features.hoveris true - Check
ricecoder.enabledis true
- Check
-
Try hovering on different symbols:
- Some symbols may not have hover info
- Try hovering on function names, variables, types
-
Check LSP server:
- Verify LSP server is running
- Check ricecoder logs for errors
-
Increase timeout:
- Hover may be timing out
- Increase
ricecoder.timeoutin settings
Problem: "Go to Definition" is not working
Solutions:
-
Verify definition navigation is enabled:
- Check
ricecoder.features.definitionis true - Check
ricecoder.enabledis true
- Check
-
Try different symbols:
- Some symbols may not have definitions
- Try on function names, class names, variable declarations
-
Check LSP server:
- Verify LSP server is running
- Check ricecoder logs for errors
-
Use Find References instead:
- Shift+F12 to find all references
- May help locate definition
Problem: Completions or diagnostics are slow
Solutions:
-
Check system resources:
- Monitor CPU and memory usage
- Close other applications if needed
-
Increase timeout:
- LSP server may be slow
- Increase
ricecoder.timeoutin settings
-
Reduce max results:
- Decrease
ricecoder.maxResultsin settings - Fewer results = faster processing
- Decrease
-
Check LSP server:
- LSP server may be overloaded
- Try restarting ricecoder
-
Disable unused features:
- Disable features you don't use
- Reduces processing overhead
Problem: Extension crashes or becomes unresponsive
Solutions:
-
Check extension logs:
- Open Output panel (Ctrl+Shift+U / Cmd+Shift+U)
- Select "RiceCoder" from dropdown
- Look for error messages
-
Disable and re-enable:
- Disable extension in Extensions panel
- Reload VS Code
- Re-enable extension
-
Reinstall extension:
- Uninstall extension
- Reload VS Code
- Reinstall extension
-
Check for updates:
- Update VS Code to latest version
- Update extension to latest version
-
Report issue:
- If problem persists, report on GitHub
- Include logs and reproduction steps
Enable debug logging to troubleshoot issues:
{
"ricecoder.debug": true,
"ricecoder.logLevel": "debug"
}Then check Output panel (Ctrl+Shift+U / Cmd+Shift+U) for detailed logs.
Create a .ricecoder/vscode-settings.json file in your project:
{
"features": {
"completion": true,
"diagnostics": true,
"hover": true,
"definition": true
},
"timeout": 5000,
"maxResults": 50,
"languages": {
"rust": {
"timeout": 10000
},
"typescript": {
"timeout": 5000
}
}
}Configure settings per workspace in .vscode/settings.json:
{
"ricecoder.enabled": true,
"ricecoder.port": 8080,
"ricecoder.features": {
"completion": true,
"diagnostics": true,
"hover": true,
"definition": true
}
}-
Reduce max results:
{ "ricecoder.maxResults": 25 } -
Increase timeout for slow LSP servers:
{ "ricecoder.timeout": 10000 } -
Disable unused features:
{ "ricecoder.features.diagnostics": false }
-
Disable real-time diagnostics:
- Diagnostics will only run on save
-
Increase diagnostic delay:
- Diagnostics will run less frequently
-
Disable for large files:
- Diagnostics can be slow on large files
- IDE Integration Guide - General IDE integration documentation
- Terminal Editor Integration Guide - vim/neovim/emacs setup
- Configuration Guide - Configuration options
- Troubleshooting Guide - General troubleshooting
Last updated: December 9, 2025