VSCode Storyscript extension
Provides Storyscript language support for Visual Studio Code powered by the Storyscript Language Server.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install story.script
Open on the VSCode Marketplace
Features
Syntax highlighting
Auto-completion
Linting
Formatting
Debug output
Set sls.debug
to true
in your user or worspace settings.
To open your user and workspace settings, use the following VS Code menu command:
- On Windows/Linux - File > Preferences > Settings
- On macOS - Code > Preferences > Settings
You can also open the Settings editor from the Command Palette (Ctrl+Shift+P
) with "Preferences: Open Settings" or use the keyboard shortcut (Ctrl+,
).
Alternatively, quickly paste this in your workspace to create a new settings file:
cat > .vscode/settings.json <<EOF
{
"sls.debug": true
}
EOF
Learn more about VSCode settings.
Development
- Install all dependencies
npm install
- Open up VSCode (dev instance)
npm run vscode
Development tips
Automatically recompile the extension
Use Typescript's watch
to monitor all Typescript files and automatically recompile the extension:
npm run watch
Now you can use the vscode:open
target to start the VSCode instance faster:
npm run vscode:open
Subsequent executions of npm run vscode:open
will refresh the development instance.
Spawn via VSCode
You can also start up a VSCode instance via VSCode. This will allow you to debug into an extension.
- Open VSCode
- Open Folder (-> select "/client")
- View -> Debug
- Run "Launch Client"
- Open up a directory with Storyscript files or create a new
.story
file