Extension init, syntax highlighting, autocompletion, install script

This commit is contained in:
2025-09-07 01:47:30 +02:00
parent e580db794d
commit 7479320aab
15 changed files with 1708 additions and 1 deletions

View File

@@ -0,0 +1,84 @@
# Installation Guide for ASHES Language Support Extension
## Quick Installation
1. **Copy the extension folder** to your VS Code extensions directory:
- **Linux**: `~/.vscode/extensions/`
- **macOS**: `~/.vscode/extensions/`
- **Windows**: `%USERPROFILE%\.vscode\extensions\`
2. **Rename the folder** to `ashes-language-support-0.1.0` (or similar)
3. **Reload VS Code** or restart the application
4. **Test the extension** by opening any `.esc` file
## Alternative Installation (Development Mode)
1. **Open VS Code** in the extension directory:
```bash
cd vscode-extension
code .
```
2. **Press F5** to run the extension in a new Extension Development Host window
3. **Open a .esc file** in the new window to test the extension
## Building from Source
1. **Install dependencies**:
```bash
npm install
```
2. **Compile TypeScript**:
```bash
npm run compile
```
3. **Package the extension** (optional):
```bash
npx vsce package
```
## Testing the Extension
1. **Open the sample file**: `sample.esc` in the extension directory
2. **Check syntax highlighting**: Events, commands, and variables should be colorized
3. **Test auto-completion**: Type `say(` and press `Ctrl+Space`
4. **Test snippets**: Type `event` and press `Tab`
5. **Test hover**: Hover over commands like `say` or `set_global`
6. **Test command reference**: Press `Ctrl+Shift+P` and 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 `.esc` extension
- Check that the language is set to "ASHES" in the bottom-right corner of VS Code
### Auto-completion not working
- Press `Ctrl+Space` to manually trigger completion
- Check that the extension is activated (should show in the Extensions panel)
## Uninstalling
Simply delete the extension folder from your VS Code extensions directory and restart VS Code.