[Qt-creator] Adding support for a new programming language to Qt Creator

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sat Sep 21 10:26:01 CEST 2013


On 20/09/13 21:38, André Pönitz wrote:
> Syntax highlighting in Creator comes in three levels. Roughly speaking the
> "better" ones based on a "real" parser (used for C++, JS, GLSL, ...) and as
> a fallback there's a generic highlighting that understands Kate's syntax
> files, and finally the "no highlighting" state.
>
> For D you currently get the Kate fallback. To improve the situation you'd
> need to implement a real parser.

OK.  I think that should be possible -- there's a standalone parser for D which 
is used in a couple of other IDE plugins.  Any advice on how to hook the parser 
into Qt Creator?

>> debugging D (it should be possible to do this with GDB and LLDB).
>
> Last time I looked the debugging info produced by some D compilers was
> pretty broken. E.g. DMD version 2.058 "encoded" the string[] type as
> "_Array_uns long long". It's hard to base proper debugging on such
> a foundation.

I imagine that shouldn't be the case for the GCC- and LLVM-based D compilers 
(GDC and LDC).  But that sounds like it would be difficult for the user to 
interpret rather than something that would actually prevent using the debugger 
per se ... ?

> There are occasional short visits of people interested in D support on
> IRC, but so far no indeed no permanent interest.

It does look like it could be a fairly in-depth project, and without very 
substantial docs on how to make plugins, it seems more difficult than it need be :-(

> As Orgad already pointed out, there's the Python plugin to have a look at.
> That shows most of the structure of a "language support plugin" but that
> does not have a real code model yet. Alternately, check the GLSL related bits,
> that's rather small and reasonably complete.

Nice, I'll do this. :-)

> For quick questions, #qt-creator at FreeNode IRC is a good choice during
> central European working hours.

I may pop up there, if I can get something vaguely working.  Thanks for the 
advice! :-)

Best wishes,

     -- Joe




More information about the Qt-creator mailing list