I just did this, as it's come up a few times where there are legitimate on-topic reasons to have this. Not just .htaccess questions, but sitemaps and all kinds of configurations needed for context in posts can be XML, JSON, etc.
See this postthis post - there's no default style, so you'll have to specify it, but that's rather easy to do. It can be done in a preformatted block, but folks are so used to just using code highlighting on other sites, enabling it to this limited level seems to make sense.