3.6 KiB
3.6 KiB
Installation Guide for ASHES Language Support Extension
Quick Installation
Automated Installation (Recommended)
Use the provided installation script for the easiest setup:
./install-extension.sh
This script will:
- Compile the extension using npm and the correct Node.js version (via nvm if available)
- Create a symlink to your VS Code extensions directory
- Handle dependencies automatically
Manual Installation
-
Compile the extension:
cd vscode-extension-ashes # Use nvm if available (recommended) nvm use # Uses version from .nvmrc # Install dependencies npm install # Compile TypeScript npm run compile -
Copy the extension folder to your VS Code extensions directory:
- Linux:
~/.vscode/extensions/ - macOS:
~/.vscode/extensions/ - Windows:
%USERPROFILE%\.vscode\extensions\
- Linux:
-
Rename the folder to
ashes-language-support-0.1.0(or similar) -
Reload VS Code or restart the application
-
Test the extension by opening any
.escfile
Alternative Installation (Development Mode)
-
Open VS Code in the extension directory:
cd vscode-extension code . -
Press F5 to run the extension in a new Extension Development Host window
-
Open a .esc file in the new window to test the extension
Building from Source
-
Set up Node.js version (recommended):
# Use nvm if available to get the correct Node.js version nvm use # Uses version from .nvmrc (v22) -
Install dependencies:
npm install -
Compile TypeScript:
npm run compile -
Package the extension (optional):
npx vsce package
Testing the Extension
- Open the sample file:
sample.escin the extension directory - Check syntax highlighting: Events, commands, and variables should be colorized
- Test auto-completion: Type
say(and pressCtrl+Space - Test snippets: Type
eventand pressTab - Test hover: Hover over commands like
sayorset_global - Test command reference: Press
Ctrl+Shift+Pand type "ASHES: Show Command Reference"
Features to Test
- ✅ Syntax highlighting for events (
:event_name) - ✅ Syntax highlighting for commands (
say,set_global, etc.) - ✅ Syntax highlighting for variables (
var,global) - ✅ Syntax highlighting for dialog blocks (
?!) - ✅ Auto-completion for commands
- ✅ Auto-completion for built-in variables
- ✅ Code snippets for common patterns
- ✅ Hover information for commands
- ✅ Smart indentation
- ✅ Code folding for events
Troubleshooting
Extension not loading
- Check that the folder is in the correct extensions directory
- Restart VS Code completely
- Check the Developer Console for errors (
Help > Toggle Developer Tools)
Syntax highlighting not working
- Make sure the file has a
.escextension - Check that the language is set to "ASHES" in the bottom-right corner of VS Code
Auto-completion not working
- Press
Ctrl+Spaceto manually trigger completion - Check that the extension is activated (should show in the Extensions panel)
Compilation errors
- Make sure you're using the correct Node.js version:
nvm use(uses v22 from .nvmrc) - Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check that TypeScript is installed:
npm list typescript - Ensure all dependencies are installed:
npm install
Uninstalling
Simply delete the extension folder from your VS Code extensions directory and restart VS Code.