Cobalt is a language extension for Hearts of Iron IV modding that provides fast, context-aware IntelliSense, syntax highlighting, and symbol indexing across your entire workspace.
It is designed to work on large mods without requiring files to be opened, giving immediate feedback and completions from all relevant sources.
Features
IntelliSense
Auto-complete for:
Scripted Effects
Scripted Triggers
Scripted Modifiers
GFX Definitions
Localisation keys
Includes both:
Built-in HoI4 documentation
User-defined symbols from your mod
Localisation entries display their actual text in completion:
Workspace Indexing
Indexes all HoI4 files on startup:
.txt, .yml, .gui, .gfx
Works even if files are not opened
Automatically updates when files change
Syntax Highlighting
Clausewitz script files
Localisation files
GFX / GUI definitions
Semantic highlighting for:
Effects
Triggers
Modifiers
Snippets
Common HoI4 scripting patterns
Expanding set of templates (WIP)
Extension Settings
cobalt-hoi4.gamePath
Path to your HoI4 installation directory. Used for loading base game documentation.
cobalt-hoi4.defaultLoc
Default localisation language to use for IntelliSense.
Default:english
Only localisation entries matching this language will appear in completions.
Roadmap
Effect parameter auto-completion
.mod file support
Improved snippet coverage
Cross-referencing and go-to-definition
Known Limitations
Localisation parsing does not yet support multiline strings
Contributing
Suggestions for snippets, features, or improvements are welcome.