STupidLord's Hearts of Iron 4 Syntax Highlighting
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.
Features
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.
Recommended extensions to pair with
Themes
- 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
State History Example

Focus Tree Example

How to add custom syntax?
- 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.5\syntaxes
- Once you have that file open, find the appropreiate syntax to add to.
- To add your syntax; replace the
PLACEHOLDERSOTHISDOESNTMATCHANYTHINGREMOVETHISTOADDYOUROWNTHINGS string 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
- Restart VSCode or use the
Developer: Reload Window command
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!
Release Notes
Full changelog
1.3.5
- Fixed issue #1 and #2 from Scarsoftime.
- Reorded
README.md and CHANGELOG.md to latest, rather than oldest.
Marketplace Update 1.3.4
1.3.3
Added after, along with a few other things.
1.3.2
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:

1.3.1
Fixed loc highlighting being broken if you had a colon after the loc string (e.x. having # TODO: at the end of the line)
1.3.0
Added coloring for .yml loc files after being pestered by my lead dev and another dev for the mod I work on.
Credits
This extension takes heavy inspiration from Thomas Boby's Paradox Syntax Highlighting, credit to him for being the reason I started making this.