Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

When putting some code sections into SO questions, the system tries to detect the language and automagically colorizes the code but sometimes if the excerpt of code is small enough it cannot get the correct language, or renders no language at all (grey text).

By looking at some edits from experienced SO users I have found the <!-- language: lang-xxx --> trick to give the correct language to the rendering engine.

That meta answer gives a list of supported languages but I have seen in SO some languages not listed here (like lang-nsis) and the source of code-prettify shows a list that is different of what is told here.

  1. Is there an up-to-date list of supported languages for syntax highlighting in Meta?
  2. Would it be possible to show it in the "markdown editing help" to keep it accessible easily?
share|improve this question

marked as duplicate by ben is uǝq backwards, hims056, Richard Tingle, Martijn Pieters, Aziz Shaikh Oct 5 '13 at 11:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You may want to read this:…. Syntax highlighting works based on the language tags in the question. The only cases I know where it sometimes isn't too accurate is when you mix multiple languages in posts (PHP/ SQL for example), also CSS highlghting is disabled. – Matt May 22 '12 at 9:15
@Matt: Thanks, I have found also that gives a bigger list, but that makes several answers for the same question, with a different content. There should have at least one as a complete reference and to be maintained. – Seki May 22 '12 at 9:53
up vote 3 down vote accepted

The list you found is up to date. We don't use all of the files in that directory, (which is why it contains languages you can't use here, like lang-wiki), and not all languages have their own files (because some are built into prettify core, like lang-sh).

There is no NSIS highlighting on Stack Overflow. If you found <!-- language: lang-nsis --> somewhere, that comment is futile. It will just use the default highlighter, which may look reasonable, thus giving the impression that lang-nsis is actually a supported plugin (has anyone actually ever created one?).

share|improve this answer
Why don't you use all (or more) of the files in that directory? Is it purely a question of popularity? If so, I think that you ought to look into adding lang-vhdl to Electrical Engineering: Support VHDL syntax highlighting is our second-most upvoted feature request! – Kevin Vermeer May 22 '12 at 13:53

Not the answer you're looking for? Browse other questions tagged .