https://github.com/emberglazee/hearts-of-modding
VS Code extension for Hearts of Iron IV modding.
https://github.com/emberglazee/hearts-of-modding
hearts-of-iron-4 hoi4 lsp paradox paradox-interactive vscode-extension
Last synced: 2 months ago
JSON representation
VS Code extension for Hearts of Iron IV modding.
- Host: GitHub
- URL: https://github.com/emberglazee/hearts-of-modding
- Owner: emberglazee
- License: mit
- Created: 2026-04-26T21:03:18.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-06-27T22:58:17.000Z (2 months ago)
- Last Synced: 2026-06-28T00:17:34.723Z (2 months ago)
- Topics: hearts-of-iron-4, hoi4, lsp, paradox, paradox-interactive, vscode-extension
- Language: Rust
- Homepage:
- Size: 3.99 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Hearts of Modding
[](https://code.visualstudio.com/)
[](https://github.com/emberglazee/Hearts-of-Modding/blob/main/LICENSE)



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](https://github.com/cwtools/cwtools) and [VModer](https://github.com/textGamex/VModer). Written with performance in mind.
---
## π 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 its 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.csv` and `adjacencies.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
1. **Install the extension** from the [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=emberglaze.hearts-of-modding) or the [Open VSX Registry](https://open-vsx.org/extension/emberglaze/hearts-of-modding).
2. **Open your mod folder** in VSCode.
3. **(Recommended)** Set `hoi4.gamePath` in your settings to your HOI4 installation for vanilla file references.
4. **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. |
## β¨οΈ 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`)**
A HOI4 install is optional but strongly recommended for the complete experience.
---
*Made with β€οΈ by a [Hearts of Minecraft](https://steamcommunity.com/sharedfiles/filedetails/?id=2624254320) mod developer.*