I really don't know
You should ask in their Github page
https://github.com/elementary/code/issues
Maybe ask for this new feature or some info on where to write the syntax definition...
UPDATE
(time:1543427125)
Thanks for the downvote, you made me learn a new thing. I followed my own suggestion and went to their Github page (as I said could be the best way to get an answer) and looked for people asking for new language support. Normal stuff right?. Found a post of a person asking for "Language Support for Ren'Py"
https://github.com/elementary/code/issues/467
There, a person who has the know-how of code's environment, told him and us that code uses gtksourceview
So I went to the old Google, searched for "twig gtksourceview"
and found this:
https://twig.symfony.com/doc/2.x/templates.html (I believe this is the Official website of the language?)
If we look for gtksourceview
we find
https://twig.symfony.com/doc/2.x/templates.html
,that leads us to:
https://github.com/gabrielcorpse/gedit-twig-template-language
Next
To add support to others just repeat:
Go to the official website and look for their gtksourceview template
format file, if they don't have a template made, look for it in Google and if all goes wrong you just can edit/create one yourself. (see below for format definition)
Create it or download it
Save it in your system where it should (see below)
Profit
Where to save it?
User
~/.local/share/gtksourceview-3.0/language-specs/
System-wide
/usr/share/gtksourceview-3.0/language-specs/
Format
https://developer.gnome.org/gtksourceview/stable/lang-reference.html