VS Code extension that adds MyHordes-aware syntax helpers: inline labels, icon previews, and hover tooltips for prototype and translation tokens.
Features
Inline label decorations for quoted tokens that map to MyHordes prototypes or translations.
Inline icon previews for prototype icons and icon IDs (16x16) inside quoted strings.
Hover tooltips with prototype metadata and translation values.
Prototype fuzzy finder to insert tokens quickly.
Language-aware translation display (FR/EN/DE/ES).
Requirements
This extension expects a MyHordes codebase to be present in the current VS Code workspace (root or a direct child folder). It locates the project by looking for a composer.json whose name is etwin/myhordes.
The extension reads:
translations/**/*.yml for translation lookups.
assets/img/** for icon previews.
Commands
MyHordes: Reload Translations: Reload translations from source files.
MyHordes: Clear Icon Cache: Clear the resized icon cache (on-disk) and in-memory metadata.
MyHordes: Select Display Language: Select the display language.
MyHordes: Fuzzy Find Prototype: Fuzzy find prototypes and insert their keys or labels.
Default keybindings:
MyHordes: Fuzzy Find Prototype - Ctrl+Shift+L
Settings
myhordes-vs-rich-syntax.language (string): Language used for the display. Default: fr. Supported: fr, en, de, es.
Development
Install dependencies: npm install
Build once: npm run compile
Watch mode: npm run watch
Packaging
This extension uses sharp, which ships native binaries per platform. Use the platform-aware scripts below (run npm install on each target OS before packaging so the correct sharp binary is included):
Package: npm run package
Publish: npm run publish
The scripts resolve the VSCE target from the current OS/CPU. Override with MHRS_VSCE_TARGET if needed (e.g. linux-x64).