ChoiceScript VS Code
A VS Code plugin for ChoiceScript, a language for writing choose-your-own-path text games.
- Syntax highlighting
- Error highlighting
- Go to definition
- Highlight usage
- Scene outline
- Rename variables project-wide
- Snippets to match Choice of Games style rules
- Italicizing and bolding text
- Word count that counts only what the player will see
Install from the VSCode extension marketplace.
Open your ChoiceScript folder, often named
mygame, and the language server will index the entire project.
Note that, since ChoiceScript files are just text files, the extension treats all
.txt files as ChoiceScript files. To avoid that, only enable the extension for workspaces that contain your ChoiceScript game.
To use the style snippets that turn
... into an ellipsis and
-- into an em-dash, enable snippet tab completion. Then type three periods and hit tab to turn them into an ellipsis.
For writing ChoiceScript games, VS Code's auto-word suggestions can be annoying. To turn it off for ChoiceScript:
F1 to open the command palette
- Type in
Preferences: Configure Language Specific Settings... and run that command
- Select "ChoiceScript" from the dropdown
- Add the following text to the
settings.json file that VS Code opens
Currently Unsupported Features
- Bug fixes to symbol indexing and syntax highlighting.
- Improved error handling for
*if in front of an
- Word counter added that skips code but counts words shown to the reader.
- Improved parsing and error checking of
- The document outline now lists all individual options in a choice.
- The document outline lets you see the flow of choices, labels, and variables in your game.
- Expanded error checking in expressions to commands like
- Expanded warnings on text that will be ignored.
- Added ability to italicize text using
i and bold text using
- Labels and achievements can now be found and renamed.
- Choices with more than 15 words are now flagged for review.
- Error catching greatly expanded.
Created a language server for ChoiceScript, which provides the following features:
- IntelliSense automatic code completion for ChoiceScript commands like
- Diagnostics to highlight errors
- Variable name changes project-wide
- Auto-indention after commands that require it, like
- Snippets to turn ... into an ellipsis and -- into an em-dash to match Choice of Games typography