## Thursday, 18 November 2010

### QtCreator 2.1 beta-2

Just downloaded QtCreator 2.1 beta-2 from here and it seems to work quite well. It's added a feature I've been looking for for ages which is syntax highlighting of non C++ files, to configure it you need to do the following.

First open up the preferences and go to the editor section and choose the generic highlighter section

Next select the download definitions and choose which ones you want (I chose Python and GLSL) as shown

This will download the file into the directory \$(HOME).config/Nokia/qtcreator/generic-highlighter and for glsl it is a file called glsl.xml. I usually name my Vertex shaders with a .vs extension and my Fragment shaders with a .fs extension so we need to add this to the xml file

<language name="GLSL" section="Sources" extensions="*.glsl;*.vert;*.frag;*.vs;*.fs" mimetype="text/x-glslsrc" version="1.02" kateversion="2.4" author="Oliver Richers (o.richers@tu-bs.de)" license="LGPL">

Now all we need to do is re-start QtCreator and we have syntax highlighted glsl ;-)