Files
rspade_system/app/RSpade/resource/vscode_extension
root 9ebcc359ae Fix code quality violations and enhance ROUTE-EXISTS-01 rule
Implement JQHTML function cache ID system and fix bundle compilation
Implement underscore prefix for system tables
Fix JS syntax linter to support decorators and grant exception to Task system
SPA: Update planning docs and wishlists with remaining features
SPA: Document Navigation API abandonment and future enhancements
Implement SPA browser integration with History API (Phase 1)
Convert contacts view page to SPA action
Convert clients pages to SPA actions and document conversion procedure
SPA: Merge GET parameters and update documentation
Implement SPA route URL generation in JavaScript and PHP
Implement SPA bootstrap controller architecture
Add SPA routing manual page (rsx:man spa)
Add SPA routing documentation to CLAUDE.md
Phase 4 Complete: Client-side SPA routing implementation
Update get_routes() consumers for unified route structure
Complete SPA Phase 3: PHP-side route type detection and is_spa flag
Restore unified routes structure and Manifest_Query class
Refactor route indexing and add SPA infrastructure
Phase 3 Complete: SPA route registration in manifest
Implement SPA Phase 2: Extract router code and test decorators
Rename Jqhtml_Component to Component and complete SPA foundation setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 17:48:15 +00:00
..

RSpade VS Code Extension

Overview

The RSpade VS Code extension provides development tools and enhancements specifically for RSpade framework projects.

Features

RSX:USE Section Management

  • Automatically highlights RSX:USE sections in gray
  • Shows info icons to indicate auto-generated code
  • Prevents accidental editing of managed sections

Smart File Operations

  • Automatically updates PHP namespaces when files are moved
  • Maintains RSX class references during refactoring
  • Updates use statements as needed

PHP Formatting Integration

  • Uses the main formatter at ./bin/rsx-format
  • Handles PHP and JSON file formatting
  • Preserves file modification times to prevent VS Code conflicts
  • Formats on save via RunOnSave extension (configured in settings.json)

LLMDIRECTIVE Folding

  • Automatically collapses LLMDIRECTIVE comment blocks
  • Reduces visual clutter in code
  • Preserves directives for AI assistants

Installation

Automatic Installation

The extension auto-installs when you open a terminal in VS Code if:

  • The project has "rspade.projectType": "rspade" in .vscode/settings.json
  • Auto-install is enabled in settings

Manual Installation

# From the extension directory
./build.sh
code --install-extension rspade-framework.vsix

Building the Extension

cd /app/RSpade/Extension
./build.sh

The build script:

  • Auto-increments version number
  • Compiles TypeScript to JavaScript
  • Packages as rspade-framework.vsix
  • Runs inside Docker for consistency

Configuration

Add to .vscode/settings.json:

{
    "rspade.projectType": "rspade",
    "rspade.autoCheckExtension": true,
    "rspade.autoInstallExtension": true
}

Setup Scripts

Located in .vscode/ide_setup/:

Unix/Linux/macOS: check_setup.sh

  • Checks for Python, PHP, Node.js dependencies
  • Verifies npm packages
  • Checks extension status
  • Auto-installs updates if configured

Windows: check_setup.ps1

  • PowerShell equivalent of Unix script
  • Uses Chocolatey for package management
  • Same functionality as Unix version

Development

Source Structure

src/
├── extension.ts         - Main extension entry
├── folding_provider.ts  - LLMDIRECTIVE folding
├── decoration_provider.ts - RSX:USE highlighting
├── file_watcher.ts      - File operation handling
└── formatting_provider.ts - PHP formatting integration

Testing

The extension is tested with:

  • Manual testing in VS Code
  • Integration with formatter tests
  • File operation scenarios

Troubleshooting

Extension Not Loading

  • Check "rspade.projectType": "rspade" in settings
  • Verify extension is installed: code --list-extensions | grep rspade
  • Check VS Code developer console for errors

Formatting Issues

  • The main formatter is now at: ./bin/rsx-format
  • For PHP files: ./bin/formatters/php-formatter
  • For JSON files: ./bin/formatters/json-formatter
  • Check IDE setup: .vscode/ide_setup/check_setup.sh
  • Verify PHP is in PATH