Bug 234898

Summary: Kate syntax colors not used for semantic highlighting
Product: [Applications] kdevelop Reporter: Peter <peter.bohning>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist CC: amilcar, danielkza2, grs, leonardo.guilherme, papricasix, patrick.peronny, q.kde
Priority: VLO    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Peter 2010-04-20 17:02:28 UTC
Version:           3.10.2 (using KDevPlatform 0.10.2) (using 4.3.5 (KDE 4.3.5), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.32-gentoo-r7-P4L_SPEC

Setting a schema for the editor doesn't seem to affect certain text, notably function and class names for c++ files.
Comment 1 Andreas Pakulat 2010-04-20 18:05:14 UTC
Right, the new C++ support adds additionally highlighting to the sources. This is intended behaviour as it improves readability of the code a lot.
Comment 2 Peter 2010-04-20 23:34:44 UTC
So in other words color schema are just completely broken for c++?
Comment 3 Milian Wolff 2010-04-20 23:57:38 UTC
Sorry Peter, but what are you trying to achieve? If you have complaints, please phrase them in proper sentences and explain us where your problem lies. Flaming doesn't help anybody.

I hope I understood your trolling correclty and adapted the bug report accordingly.

For anybody who wants to fix it: Take a look at the KTextEditor::HighlightInterface and KDevplatform's ColorCache.
Comment 4 Amilcar do Carmo Lucas 2010-04-21 00:31:49 UTC
No Milian, what I think petter wants is a possibility to disable the excelent KDevelop4 highlighting, and fall back to the simpler and incomplete kate highlighter (the same KDevelop3 used).

So basically he did not find the "settings > Configure KDevelop > Language Support" menu.
Comment 5 Peter 2010-04-21 01:09:57 UTC
Sorry, it annoyed me that you said "right" and told me that a bug was a feature.  I would hardly say my response was "flaming" or "trolling".

I want to change the colors for the syntax.  I think its wonderful that kdevelop 4 handles c++ syntax better, but I want to change the colors.

If kdevelop no longer does this or the kate schema coloring is deprecated, then why have that at all?

This is a bug.  Either the kate coloring should have more options to support the new c++ syntax coloring features, or that coloring should be an option elsewhere.  And in that case, why have kate integrated into the IDE at all?
Comment 6 Andreas Pakulat 2010-04-21 08:30:56 UTC
(In reply to comment #5)
> Sorry, it annoyed me that you said "right" and told me that a bug was a
> feature.  I would hardly say my response was "flaming" or "trolling".

They are, because you're making statements about things that you clearly are not fully informed about. Thats trolling in my book.

> I want to change the colors for the syntax.

You can change some of the colors via kates syntax highlighting. This however only affects what kates integrated syntaxhighlighting knows about.

> If kdevelop no longer does this or the kate schema coloring is deprecated, then
> why have that at all?

Its not, kate's highlighting still works and still is done, KDevelop only adds additional highlighting for C++ files and only C++ files.
 
> This is a bug.

No its not. Its a missing feature that you cannot change the additional syntax colors that C++ support uses.

> Either the kate coloring should have more options to support
> the new c++ syntax coloring features,

No it shouldn't, if kate has no way of knowing about things like uses of a variable etc. (and it can't as thats beyond the scope of its 'parsing') then
it shouldn't have a syntax coloring option for it.

> or that coloring should be an option
> elsewhere.

Right, but only for the additional stuff that C++ support adds.

>  And in that case, why have kate integrated into the IDE at all?

I guess you mean only kate's syntax highlighting, because not integrating kate doesn't make the slightest sense at all. And as I said above kate's syntax-highlighting still works and is even needed for anything besides C++.
Comment 7 Peter 2010-04-21 09:47:16 UTC
Fine, "a missing feature", so glad I posted this.
Comment 8 Leonardo 2012-02-26 05:48:17 UTC
Hello.

(In reply to comment #4)
> No Milian, what I think petter wants is a possibility to disable the excelent
> KDevelop4 highlighting, and fall back to the simpler and incomplete kate
> highlighter (the same KDevelop3 used).

I understand that kdevelop highlight is far better than kate's only, mainly because it understand context, but arguing that some hardcoded options (like bold fonts or colors) do improve readability is a mistake - readability is a subjective and personal taste. I for example do not like bold fonts. There are those who believe this: http://www.sourceinsight.com/features_files/FullAppLg.gif is a readability improvement, I disagree.

To be honest, what I hate most is software that thinks that knows more than myself about my own taste. Thats why many of us are using Linux, not Windows.
 
> So basically he did not find the "settings > Configure KDevelop > Language
> Support" menu.

No, basically you failed to understand what he was asking. And it really bugs me that you treated him this ironical way of yours.

Thing is, to disable the bold font for method and variable names I had to edit kdevplatform sourcecode. I do think thats a bug - maybe not a software bug. This choice clearly don't belong to the developer but to the user, and users usually don't know or don't want to change code at all. They should'nt need.

If possible, a solution to this bug would be to provide options for the users regarding colors and styles that don't belong to kate.

Thanks.
Comment 9 steveren 2012-03-30 15:44:12 UTC
Just want to second the motion that syntax colouring should be <i>my</i> choice, not hard-coded by somebody else, no matter how well-meaning or convinced they're right.

I've used IDEs which default to bold font for some words for years, probably decades, and I've <i>always</i> switched it off because I just don't personally like it. But with KDevelop I can't unless I change the source. What a PITA.
Comment 10 Michael Dudek 2013-04-19 15:21:06 UTC
I would apreciate it, if this feature/bug/what ever gets some attention ;)

Anyway, thx for the great software!
Comment 11 Daniel Miranda 2014-09-06 19:47:50 UTC
I find this is still a problem on KDevelop 4.13. Are there any plans to improve this on platform 5? Or at least properly document that custom colors might not be used in some circunstances (for example, I'm working in C, and I can't see to find any way to make my color for functions be used at all).
Comment 12 Miquel Sabaté 2015-02-26 14:38:10 UTC
Git commit 2d10f874048343172591e9cb15927f8d45abff49 by Miquel Sabaté.
Committed on 26/02/2015 at 14:36.
Pushed by mssola into branch 'master'.

Added option to enable/disable bold style from declarations.

REVIEW: 122727
Related: bug 294819

M  +1    -0    interfaces/icompletionsettings.h
M  +3    -1    language/highlighting/codehighlighting.cpp
M  +6    -1    language/highlighting/colorcache.cpp
M  +3    -0    language/highlighting/colorcache.h
M  +7    -2    shell/completionsettings.cpp
M  +7    -1    shell/completionsettings.h
M  +3    -0    shell/settings/ccconfig.kcfg
M  +44   -29   shell/settings/ccpreferences.ui

http://commits.kde.org/kdevplatform/2d10f874048343172591e9cb15927f8d45abff49