Gnome has a syntax highlighting sub-system that editors like Xed and Pluma use, with .lang files somewhere iirc, regex based, can do keyword and literal highlighting quite nicely. Limited to Gnome of course, but good for experimentation. Maybe Windows/Mac/other Linux has something similar.
Edit: for VS Code:
https://code.visualstudio.com/api/language-extensions/syntax...