# Is anyone interested in adding GLSL and HLSL to our syntax highlighting?

Following the meta post Can we get prettier code markup? syntax highlighting has been activated for our site. For example, if you want the code in your post to show up with C++ syntax highlighting, you simply include the following in your post:

<!-- language-all: lang-cplusplus -->


If you only want it to apply to the next code block (if you have more than one code block and want to use more than one language), just omit the -all:

<!-- language: lang-cplusplus -->


This works for a wide range of languages, but not all, and notably not GLSL or HLSL, which are likely to be in frequent use on our site.

Looking at the language extension files for prettify.js (which Stack Exchange uses for syntax highlighting), most seem to be between 30 and 100 lines of code including extensive commenting, so writing one for GLSL or HLSL seems like it would be a reasonable task for someone familiar with the languages.

Would anyone be interested in doing this?

If so, indicating here will allow collaboration if we have more than one person interested, and we can link to work in progress.

• Currently I don't have the time to do that, but after having a quick look into the files it looks a bit similar to the GeSHi config files. And GeSHi already has GLSL support, so the GeSHi GLSL config file (on GitHub) could maybe help when addressing this. – Nero Aug 16 '15 at 17:19
• I also have a GeSHi syntax file for HLSL (originally by Nick Darnell, though it's apparently not on his site anymore). – Nathan Reed Aug 16 '15 at 17:32
• Well, in the mean time, C/C++ highlighting should do the job. It should only miss the vec3s/float3s... – glampert Aug 17 '15 at 1:19
• I've added answers for voting on different languages so anyone considering writing an extension can see which languages are most in demand here. – trichoplax Aug 17 '15 at 11:12
• I've since discovered that simply providing a list of options to vote on is not the best way to have a discussion. Feel free to add answers that express opinions rather than simply giving options. – trichoplax Aug 18 '15 at 21:49

# Upvotes indicate demand for GLSL syntax highlighting

Feel free to edit in any reasons / examples.