customize syntax-highlighting

Christian Couder chcouder at club-internet.fr
Sun Nov 11 22:34:46 GMT 2001


Hi,

Maximilian Hrabowski wrote :
> 
> is there any way to customize the syntax-highlighting in the editor?

The editor in the current stable version of KDevelop is still based on
an old fork of kwrite where highlighting is hardcoded.
So if you want to customize it or (earlier versions) you will have to
make changes in the kdevelop/kwrite/highlight.cpp file.

Roland Krause has worked on a branch of kdevelop 2.x to use kate as the
editor. You could perhaps use this branch. (Ask Roland about it.)

In kate, syntax highlighting is now defined in xml files (one xml file
for each supported language). So it's much simpler to customize.

KDevelop 3.0 (still in development) will hopefully be able to use
different external editors like kate. 

> 
> I have some special data types and want them to be displayed like int, long &
> co.

It should not be very difficult to customize the code in
kdevelop/kwrite/highlight.cpp because highlighted data types are defined
like this :

const char *cTypes[] = {
  "auto", "char", "const", "double", "float", "int", "long", "register",
  "short", "signed", "static",
  "unsigned", "void", "volatile", 0L};

const char *cppTypes[] = {
  "bool", "wchar_t", "mutable", 0L};

you probably need to add your special types to the list, compile and
install.

Bye,
Christian.

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list