I’ve created an extension for VS Code that supports syntax highlighting, variable reference lookup, autocomplete, and custom inserts/modifiers/macros for Chapbook and SugarCube. It also includes a game build system and plays games directly in VS Code. You can install it from the VS Code marketplace.
11 Likes
I no longer use Twine but I can appreciate the effort required to build this and the utility. If this had been around when I was, I would definitely have tried it out.
3 Likes
Thankfully I’d done the heavy lifting of learning how to write one of these for my ChoiceScript extension a few years ago.
1 Like
Well done.
One small SugarCube related suggestion… …the print macro call you’re using to generate the <div>
element at the end of the code example may be better achieved using Attribute Directive markup.
<div class="readout-inner-bar" @style="'border-color: ' + $power_color">blah</div>
1 Like
Thanks! That’s from my game that was out in sub-Q a few years ago but it’s good knowledge for future work.
Also it means the extension needs to watch for those to pass it thru its TwineScript parser and capture variable references.