Skip to content

VS Code extensions

There are two. Search for Wraith in the Extensions view and install it, and Salamander comes with it.

  • Salamander highlights .sal schemas and has snippets for them.
  • Wraith teaches VS Code the rest of Wraith’s files. It needs Salamander and installs it for you.
File You get
.sal schemas Highlighting and snippets from Salamander. Wraith adds [Sig] and [VirtualTable] highlighting
.rwt tweaks Highlighting, with asm, JS, Lua and schemas inside highlighted too, plus snippets
.rws.js .rws.lua scripts Opens as JavaScript or Lua. Lua ones get types, see below
Lua plugins Types for require("wraith") and your schemas, see below
.rwa.zon .rwp.zon Opens as ZON. Install the Zig extension for highlighting

Type the prefix and press Tab.

In Prefixes
.rwt group @group subgroup @use @children @globals tweak patch inject bytes sym toggle choices hook luahook jspatch luapatch js lua
.sal struct structb union enum bitfield error field trait async impl virtual fn const

A .rwp project is a zip. Unzip it to edit the files here, then zip it back up and open it in the Workbench. See Projects.

JS and TypeScript plugins don’t need Wraith’s extension for your code, since VS Code already knows TypeScript. Salamander is there for your schemas/*.sal files.

Open a Lua plugin’s folder, or one with .rws.lua scripts, and the Wraith extension runs wraith sdk lua types there. That writes Wraith’s types to .wraith/types, and a .luarc.json pointing at them if there isn’t one. The Lua extension picks them up for completions and type checks.

It runs again when you open the folder and when a .sal file changes, so the types match the Wraith you have. Wraith: Update Lua types in the command palette runs it now.

Scripts get the API as globals, like in the Workbench. Plugins get it from require("wraith"). Lua inside .rwt tweaks is only highlighted.

Setting Does
wraith.luaTypes Turn it off to leave your types alone
wraith.path Where wraith.exe is, if it isn’t found on its own

Made with ♥ by Asgard