STupidLord's Hearts of Iron 4 Syntax Highlighting is a extention made to highlight your HoI4 code in a simple way.
If you encounter any missing highlighting feel free to make an issue.
The main and currently only function of this extension is highlighting the various pieces of code for HoI4. It also includes a way to add your own custom syntax, i.e. for custom ideologies, scripted effects, missing syntax, ect.
- HoI4 Dark
- HoI4 Light - p.s. I'm not a light mode user so I don't know exactly what people look for in a light theme
- Custom syntax is added in the user.tmLanguage.json file. To find this on your device, it should be located at
%USERPROFILE%\.vscode\extensions\stupidproductions.stupid-hoi4-syntax-1.3.3\syntaxes - Once you have that file open, find the appropreiate syntax to add to.
- To add your syntax; replace the
PLACEHOLDERSOTHISDOESNTMATCHANYTHINGREMOVETHISTOADDYOUROWNTHINGSstring inside of"match": "\\b()\\b"with your desired text- To add multiple sets of text use the pipe symbol
|as a devider - For more advanced syntax you can reference Regular Expression Language - Quick Reference and Language Grammars
- To add multiple sets of text use the pipe symbol
- Restart VSCode or use the
Developer: Reload Windowcommand
Warning, updates may overwrite your user.tmLanguage.json file, make backups if you are worried about losing it or have a lot of custom syntax!
Added coloring for .yml loc files after being pestered by my lead dev and another dev for the mod I work on.
Fixed loc highlighting being broken if you had a colon after the loc string (e.x. having # TODO: at the end of the line)
Fixed an issue where three number states would be highlighted with the color of tags. (Hid pre 1.2.0 updates to condense Release Notes)
Before:
After:
Added after, along with a few other things.
- Updated
package.jsonto point to new repo location at https://github.com/STupidProductions/HoI4-Syntax. - Updated How to add custom syntax? to actually point to the correct version location insetad of
stupidlord.stupid-hoi4-syntax-1.1.0.
This extension takes heavy inspiration from Thomas Boby's Paradox Syntax Highlighting, credit to him for being the reason I started making this.



