Wikitext syntax highlighting depends on extensions used, since extensions can enhance the wikitext parser adding their own tags and parser functions. And since only an extension knows about syntax that are used inside it own tags or parser functions, one should provide own modes for text highlighting, otherwise it will displayed as is (plain text).
CodeMirror uses hook `CodeMirrorGetAdditionalResources` that allows extensions to integrate with CodeMirror.
Example [[ https://gerrit.wikimedia.org/r/#/c/348673/ | Cite ]], [[ https://phabricator.wikimedia.org/diffusion/ETAG/browse/master/PhpTags.hooks.php;3061a8c5ca2ba4cd9399d27e7b7f68f2811d3c08$48 | PhpTags ]]
Seems this is not the best performance solution.
I think the better way is allow to integrate through extension.json file.
I know only one possible way to merge several values from different extensions (such as list of resource modules required for CodeMirror) , it is global variable (`config` property in extension.json) but it seems too ugly solution..
Seems extension schema should be extended with CodeMirrorResourceModules property...