Version: (using KDE KDE 3.1) Installed from: RedHat RPMs Compiler: gcc 3.2 OS: Linux Hi, The settings I specify under Highlight Modes on the 'Configure Kate' dialog box for C++ are only applied to *.cpp sources. E.g. I set 'Normal Text' = bold, text in *.h files are still regular size, unless I select bold for 'Normal Text' under the 'Default Styles'. Top lines of cpp.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd"> <language name="C++" version="1.03" kateversion="2.1" section="Sources" extensions="*.cxx;*.cpp;*.cc;*.C;*.h" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr">
I can confirm this bug for KDE HEAD. kdelibs 07/02/2003 19:10 GMT kdebase 07/03/2003 18:42 GMT Bye Christian L.
Subject: Re: New: C++ header files do not use cpp.xml syntax highlighting On Friday 04 July 2003 07:56, Christian wrote: > Hi, The settings I specify under Highlight Modes on the 'Configure Kate' > dialog box for C++ are only applied to *.cpp sources. E.g. I set 'Normal > Text' = bold, text in *.h files are still regular size, unless I select > bold for 'Normal Text' under the 'Default Styles'. > > Top lines of cpp.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE language SYSTEM "language.dtd"> > <language name="C++" version="1.03" kateversion="2.1" section="Sources" > extensions="*.cxx;*.cpp;*.cc;*.C;*.h" > mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr"> At least in HEAD there is a priority option, which is used when the mime type is [word i can't remember, undecided cause more is possible] The default priority for c++ is set to 9 (which i high) because we are in a c++ environment. There was some discussion about how to handle it, personally I still feel that a content based analysis should weigh more than a user set priority, even it is slower. Jowenn? -anders
problem is how to decide if the user wants cpp or c, that can't be really done right, k, as soon as you can detect some class you could say is cpp, but could be a failure, other way around same, even if only plain c, could be a cpp include, the priority lets the user decide which type should come up in the conflict cases, think that is good enough atm apart from that: isn't cpp allready used for .h files per default atm ?
Yes, I agree. The priority is good enough. The problem is (for me) that at the moment the header files don't have syntax highlightning at all. Neither cpp nor c. Is something wrong with my setup? Please don't hesitate to ask for more information. Christian
hmm, perhaps not the right mimetypes there on your machine, but even in that case the hl should use the patterns for the file endings, no idea, I will close that bug as this problem is solved, if you need more help with the hl, please mail to kwrite-devel@kde. org, but guess only temporary bug, but no idea why, really :/
Okay I found out what the problem was. Both, c++ and c highlighting, had priority 0 (don't know how that happened), so the c highlighting was selected. For some strange reason, my c highlighting had defined black color for all parts, so it looked like there was no syntax highlighting at all. I now increased the priority for c++ and it works. :-) Christian