If you want to, you can modify $:/core/ui/ViewTemplate/body to this:
\define render-snippet()
```$(language)$
$(codeSnippet)$
```
\end
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" state=<<folded-state>> text="hide" retain="yes" animate="yes">
<$list filter="[all[current]!has[plugin-type]!field:hide-body[yes]]">
<$list filter="[all[current]tags[]regexp[^\$:\/tags\/highlight\/]limit[1]]" variable="highlightTag" emptyMessage="""
<$transclude>
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
</$transclude>
""">
<$list filter="[<highlightTag>removeprefix[$:/tags/highlight/]]" variable="language">
<$wikify name="codeSnippet" text="""<$text text={{{ [<currentTiddler>get[text]] }}}/>""">
<<render-snippet>>
</$wikify>
</$list>
</$list>
</$list>
</$reveal>
this renders tiddlers tagged with $:/tags/highlight/xml in xml, $:/tags/highlight/javascript in javascript and so on.
If you transclude such a tiddler with {{my-snippet-tiddler}} the highlighting will not be rendered...
therefor, you could use a macro that transcludes such a tiddler with the highlighting applied. put this in a tiddler tagged with $:/tags/Macro :
\define render-code-snippet()
```$(snippetLanguage)$
$(snippetCode)$
```
\end
\define snip(tiddler)
<$list filter="[<__tiddler__>tags[]removeprefix[$:/tags/highlight/]limit[1]]" variable="snippetLanguage">
<$wikify name="snippetCode" text="""<$text text={{{ [<__tiddler__>get[text]] }}}>""">
<<render-code-snippet>>
</$wikify>
</$list>
\end
With this in a macro tiddler, you can include your code snippets in other tiddlers with:
<<snip "snippet tiddler title">>