Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
3.0 KiB
Executable File
3.0 KiB
Executable File
RSpade VS Code Extension Setup Guide
Overview
The RSpade VS Code extension can be set up in multiple ways depending on your needs:
- Development Mode - For active development of the extension
- Production Mode - For regular use with a packaged extension
- Automatic Setup - Using provided scripts
Setup Methods
Method 1: Automatic Setup (Recommended)
The easiest way is to use the VS Code task:
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run "Tasks: Run Task"
- Select "RSpade: Setup VS Code Extension"
- Choose between development or production mode
Method 2: Manual Development Mode
For extension development without packaging:
# Unix/Linux/macOS
cd ~/.vscode/extensions
ln -s /var/www/html/app/RSpade/Extension rspade.rspade-framework-dev
# Windows (requires admin or use junction)
cd %APPDATA%\Code\User\extensions
mklink /D rspade.rspade-framework-dev "C:\path\to\project\app\RSpade\Extension"
Then compile the TypeScript:
cd /var/www/html/app/RSpade/Extension
npm install
npm run compile
Method 3: Packaged Installation
For production use:
cd /var/www/html/app/RSpade/Extension
./install.sh # or install.ps1 on Windows
VS Code Integration
Automatic Recommendation
When you open the project, VS Code will automatically recommend the extension because it's listed in .vscode/extensions.json.
Extension Features
Once installed, the extension provides:
-
Automatic LLMDIRECTIVE Folding
- Folds coding convention blocks by default
- Toggle with "RSpade: Toggle LLMDIRECTIVE Folding"
-
RSX:USE Visual Indicators
- Yellow highlighting for auto-generated sections
- Warning when editing these sections
-
Format on Move
- Automatically updates namespaces when moving PHP files
- Works with drag-and-drop in VS Code explorer
-
Native PHP Formatting
- Replaces RunOnSave extension
- Format on save or manually with "Format Document"
Development Workflow
If you're developing the extension:
- Make changes to TypeScript files in
src/ - Run
npm run compileto rebuild - Reload VS Code window (Ctrl+R / Cmd+R)
- Test your changes
Troubleshooting
Extension Not Loading
- Check if it appears in Extensions view
- Look for errors in Output > Extension Host
- Ensure TypeScript is compiled:
npm run compile
Formatting Not Working
- Ensure PHP is installed and accessible
- Check
./bin/rsx-formatand./bin/formatters/are present - Verify RunOnSave extension is configured in
.vscode/settings.json
Development Symlink Issues
- On Windows, you may need admin rights for symlinks
- Use junction (
mklink /J) as alternative - Ensure no spaces in symlink name
Configuration
After installation, configure via VS Code settings:
{
"rspade.enableCodeFolding": true,
"rspade.enableReadOnlyRegions": true,
"rspade.enableFormatOnMove": true,
"rspade.pythonPath": "python3" // or "python" on Windows
}