GitHub • Discussion • VSC Marketplace • OVSX Registry
An experimental work-in-progress high-performance Visual Studio Code extension for Hearts of Iron IV (HOI4) modding, powered by a dedicated Language Server Protocol (LSP) server written in Rust.
Inspired by CWTools and VModer. Written with performance in mind.
📑 Table of Contents
- 🚀 Features
- ✨ Get started
- 🧑🧒 For submods
- ⚙️ Might wanna tweak these
- ⌨️ Commands
- ✌️ Requirements
- ⭐ Star History
🚀 Features
✍️ Smarter editing
-
Auto-complete triggers, modifiers, countries, ideas, traits, abilities.
-
Hover over anything to see what it does: hover a trigger to read its documentation, an idea to see its modifiers, a state ID to see its name, a localization to preview it.
-
Click to jump to definitions: F12 on any event, idea, character, or focus takes you straight to where it's defined.
🔎 Catch mistakes early
-
Errors for typos, missing brackets, unknown entities, invalid values.
-
Warns for too high leader skill levels, building levels exceeding their max, or non-existant victory points in a province.
-
Checks your localization for missing and duplicate keys, unclosed color codes, and invalid scopes/commands.
🗺️ Map & data tools
-
Validates
definition.csvandadjacencies.csv: checks province IDs, terrain names, flags unknown provinces. -
Hover over map files to see province terrain, type, and coastal status.
🎨 Better visuals
-
Vibrant syntax highlighting with custom light/dark VSCode themes: color-coded triggers, effects, modifiers, scope references, and localization strings.
-
In-editor color previews: localization color codes render as their actual colors right in the editor.
✨ Get started
-
Install the extension from the VSCode Marketplace or the Open VSX Registry.
-
Open your mod folder in VSCode.
-
(Recommended) Set
hoi4.gamePathin your settings to your HOI4 installation for vanilla file references. -
Happy modding.
🧑🧒 For submods
The extension automatically discovers installed mods and loads them to provide accurate completions and validation in submods as well.
⚙️ Might wanna tweak these
| Setting | What it does |
|---|---|
hoi4.gamePath |
Path to your local HOI4 install. Enables vanilla + submod data support. |
hoi4.styling.enabled |
✨ Styling suggestions ✨ (tabs vs spaces, trailing whitespace, etc). On by default. |
hoi4.validator.workspaceScan.enabled |
Scan all mod files for errors on startup. Off by default, slow for huge mods. |
hoi4.showMemoryUsage.enabled |
Shows the HoM LSP RAM usage in the status bar. |
hoi4.validator.scopeValidationEnabled |
Opt into experimental scope validation. |
⌨️ Commands
Type "Hearts of Modding" in the command palette (Ctrl+Shift+P) to see all commands:
-
Toggle LSP: Start/stop the language server.
-
Set Game Path: Point to your HOI4 installation.
-
Toggle Workspace Scan: Scan all the files for issues.
-
Toggle Theme: Switch between the extension themes.
✌️ Requirements
-
VSCode v1.82.0+
-
Windows or Linux (
amd64/x64) or macOS (arm64)- LSP also compiled for Windows/Linux
arm64and macOSamd64but stability is not guaranteed. Not bundled with the extension, automatically downloaded separately from the latest release, and verified against the release'sSHA256SUMSbefore use.
- LSP also compiled for Windows/Linux
A HOI4 install is optional but strongly recommended for the complete experience.
⭐ Star History
This whole project is a solo-dev effort. All contributions, from reporting bugs and suggesting new ideas, to direct code contribution, are welcome!
Made with 💙 by a Hearts of Minecraft mod developer.
- embi