Zilvereyes WoW AddOn Development Preview
This VS Code extension brings together WoW TOC highlighting, client-aware TOC and XML checks, LuaLS SavedVariables and API definitions, and optional local Ollama completion.
The TOC grammar and editor features build on vscode-wow-toc, originally by Stanzilla. The API libraries build on Ketho's WoW API annotations.
Features
.toc file colorization
- starting point snippet
Grammars
> Toc files
Also included is a simple grammar for .toc files with support for keywords (like ## Interface, ## Author and such) and X-keywords (like ## X-Date, ## X-Website and such)

Zilvereyes recovery preview
Run .\Open-Preview.ps1 from this worktree. It opens Preview.toc with WoW TOC Theme in a fresh VS Code profile with its own extensions directory. Each preview uses a temporary, separate user profile.
npm ci --ignore-scripts followed by npm test checks the grammar with TextMate and Oniguruma, including token colors.
.\Open-Preview.ps1 -Verify checks extension discovery, theme selection and TOC language detection in VS Code.
- Use Developer: Inspect Editor Tokens and Scopes in the preview to verify the color and scope of an individual token.
The grammar starts from the recovered VS Code snapshot RsU4.json from 15 June 2026. Conditional and file variable rules come from the earlier toc.tmLanguage.json download and have separate scopes inside file entries. The reconstructed theme uses the 17 TOC rules in the historical settings snapshot XfkR.json, mapped to the merged grammar’s scopes. The backup also contains the earlier theme palette in Rl5B.json. These tests cover editor highlighting. The game client interprets directives according to its build.
TOC and XML file reference warnings
Set these workspace settings for the add-on you are editing:
{
"zilvereyes.wowAddon.xmlReferenceManifest": "MyAddon.toc",
"zilvereyes.wowAddon.xmlReferenceClient": "classic-era",
"zilvereyes.wowAddon.xmlReferenceTextLocale": "enUS"
}
The manifest is explicit. Select classic-era for Classic Era (Vanilla) or retail for Retail (Standard). The settings picker also lists the supported Classic expansions. Set the optional text locale when the add-on uses locale restrictions or [TextLocale].
The check reads the TOC through the SDK, applies AllowLoadGameType and ExcludeLoadGameType on the manifest and its file lines, and supports inline AllowLoadTextLocale and AllowLoad for the in-game editor context. It expands [Family], [Game] and [TextLocale] in TOC Lua and XML paths. Unknown client or locale conditions, unsupported conditions and unresolved variables suppress diagnostics for their affected entries. The XML walk follows Include recursively and resolves literal Include and Script paths from the referring XML file. Missing Lua or XML selected by the TOC is reported on its TOC line. A missing XML reference target is marked on the value of the referring XML file attribute. The Problems panel refreshes on client changes and when relevant files are created, removed or saved. The TOC format reference describes the loading directives and file variables.
Check AddOn
Run WoW AddOn: Check AddOn from the Command Palette in a trusted local add-on folder. Open a root-level TOC to check it explicitly. From another editor, the command uses the configured reference manifest, falls back to the SavedVariables manifest, or offers the folder's TOCs for you to choose. It uses the workspace's client and text locale settings and reads the saved files on disk.
The read-only report lists account and per-character SavedVariables, with conditional declarations labelled, followed by active Lua and XML references in traversal order. Nested Includes appear where they occur, and repeat references stay visible. Click a found path to open its file or click the source location at the end of a row to jump to its TOC entry or XML attribute. Missing paths, unverified paths, incomplete XML and Include cycles are labelled in place. The report describes the extension's client-aware file selection and shows how many manifest entries it skipped.
SDK dependency
sdk-source.json pins the source revision of wow-addon-sdk. On either laptop, check out and build that SDK revision, then bundle its public TOC, XML and SavedVariables APIs into the extension. The SDK owns parsing and source ranges. The extension supplies the client selection, file checks and VS Code diagnostics. See the SDK's editor consumer contract for the API responsibilities.
git clone https://github.com/Zilvereyes/wow-addon-sdk.git
git -C wow-addon-sdk switch --detach af12ebfaee634459ca8c6db6de0aadf42ee31f19
npm --prefix wow-addon-sdk ci
npm --prefix wow-addon-sdk run build
# From the extension checkout with the SDK next to it:
npm ci
npm run build:sdk -- ../wow-addon-sdk
npm test
LuaLS SavedVariables sync uses its own setting, zilvereyes.wowAddon.savedVariablesManifest.
WoW AddOn Development preview
The preview provides TOC syntax and themes, XML file-reference diagnostics,
Check AddOn, SavedVariables for LuaLS, client-specific API libraries and local
Ollama inline completion for Lua.
- In the test workspace, enable Lua (LuaLS) and disable Ketho WoW API and
WoW Lua Inline Completion. The standalone WoW TOC extension can stay enabled.
While enabled, it handles automatic XML reference warnings and SavedVariables
sync. Both extensions use the standalone extension's
zilvereyes.wowToc.*
settings while it is enabled, so API completion and file checks use the same
client. The preview still provides its own WoW AddOn: Check AddOn command,
API libraries and Ollama features. With standalone WoW TOC disabled, the
preview handles the automatic checks using its own zilvereyes.wowAddon.*
settings. Existing zilvereyes.wowToc.* values are used as fallbacks.
- Set
zilvereyes.wowAddon.xmlReferenceClient to the target client, or use
zilvereyes.wowToc.xmlReferenceClient while standalone WoW TOC is enabled.
The selected client controls TOC and XML traversal and the API library.
- Run WoW AddOn: Configure LuaLS WoW API Library. The command enables sync
and preserves existing entries in
Lua.workspace.library. Subsequent client
changes replace the library path in workspace settings. If a folder uses
.luarc.json or .luarc.jsonc, run the command after each client change and
replace the library path in that file.
The pinned wow-addon-sdk powers TOC and XML analysis. The pinned, MIT-licensed
WoW API annotations and client catalog provide libraries for Classic Era,
Retail, Burning Crusade and Mists. The source catalog covers runtime API symbols
and has partial coverage of helpers and types. Wrath and Cataclysm retain
TOC/XML support and have no bundled API library in this preview.
Workspace status
Click WoW in the status bar or run WoW AddOn: Show Workspace Status.
It shows the selected client, active TOC, XML check, SavedVariables manifest,
LuaLS API library, and Ollama models visible in VS Code Chat. Select a row
to open the related file, setting, or command.
Ollama in the editor and Chat
- For inline Lua suggestions, enable
zilvereyes.wowAddon.luaInline.enabled
in the trusted workspace. Set the Ollama base URL and model in user settings
with zilvereyes.wowAddon.luaInline.apiBase and
zilvereyes.wowAddon.luaInline.model. The defaults are
http://127.0.0.1:11434/ and qwen2.5-coder:1.5b-base.
- For Chat, enable the official Ollama extension. Run WoW AddOn: Manage
Ollama Models in Chat to open VS Code's model management. Add or configure
Ollama with a base URL such as
http://127.0.0.1:11434 and choose an installed
chat model in the Chat picker. VS Code and the Ollama extension manage the
Chat model separately from inline suggestions and Continue.
Build the annotation library from a local checkout containing the pinned commit:
npm run build:wow-api -- ../vscode-wow-api
Test a release candidate on Windows
Download the VSIX and SHA256SUMS.txt from the same GitHub Release. In PowerShell,
compare the VSIX hash from Get-FileHash -LiteralPath <vsix> -Algorithm SHA256
with the published value before using Extensions: Install from VSIX. Enable
LuaLS in the target workspace. If you keep the standalone WoW TOC extension,
use its client and manifest settings as described above.
To test the installation separately from your normal editor profile, use
tests/Test-ClassicEraRelease.ps1 from this repository. Supply the VSIX, a
ZilverUI ZIP, their SHA-256 values, and the path to the installed LuaLS extension.
For the upgrade check, also pass -LegacyTocVsix and -LegacyTocVsixSha256.
.\tests\Test-ClassicEraRelease.ps1 -Vsix $vsix -VsixSha256 $vsixHash `
-AddonZip $zilverUiZip -AddonZipSha256 $zilverUiHash `
-LuaLsExtensionDirectory $luaLsDirectory
The script creates a fresh VS Code profile and an unpacked copy of the add-on.
It writes receipt.json only after the editor checks pass. It exercises Classic
Era API completion, nested XML warnings, and SavedVariables in LuaLS.