# Support auto-highlighting for preformatted code

**URL:** <https://meta.discourse.org/t/support-auto-highlighting-for-preformatted-code/14234>\
**Category:** Feature\
**Created:** [28 Marzo 2014, 2:52pm UTC](https://meta.discourse.org/t/support-auto-highlighting-for-preformatted-code/14234 "2014-03-28T14:52:10Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)\
**Post date:** [22 Settembre 2014, 1:10pm UTC](https://meta.discourse.org/t/support-auto-highlighting-for-preformatted-code/14234/11 "2014-09-22T13:10:19Z")

</div>

Is there a general rule on which languages are supported by Discourse?

Highlight.js shipped with Discourse recognises only a small subset of [all supported languages](https://highlightjs.org/static/test.html).

```javascritpt
> JSON.stringify(hljs.listLanguages())
< ["bash","cs","ruby","diff","javascript","xml","markdown","css","http","java","php","python","sql","handlebars","ini","perl","objectivec","coffeescript","nginx","json","apache","cpp","makefile","go"]

```

I see that highlighting of Go code [was added just recently](https://github.com/discourse/discourse/commit/2aa907e34e0ff237e37d5e79f0f56042ba3978b5). Personally, I miss TeX, Haskell, Lua, Groovy and Erlang.

Is it feasible to include highlight,js build with more languages by default?

I understand that for most of communities most of uncommon languages are irrelevant and shipping smaller library helps with performance. But how can I add missing language to my instance?

Perhaps it would be beneficial to add an Admin setting with URL of `highlight.pack.js` (similar to [this PR for discourse-mathjax](https://github.com/kasperpeulen/discourse-mathjax/pull/13) plugin)? That way I could [build my own version](http://highlightjs.org/download/) of the library.

What would be the best way to solve this?

---

_[View the full topic](https://meta.discourse.org/t/support-auto-highlighting-for-preformatted-code/14234)._
