Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: DarkBug on December 27, 2011, 11:47:02 am

Title: Suggestion: syntax highlighting for classes and objects in C++
Post by: DarkBug on December 27, 2011, 11:47:02 am
Hello,

i like to suggest syntax highlighting for classes and objects in C++. It would increase the readability.

Regards,
DarkBug
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: MortenMacFly on December 28, 2011, 04:27:14 pm
i like to suggest syntax highlighting for classes and objects in C++. It would increase the readability.
So why don't you just do it? You can setup the lexer(s) as you like.
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: DarkBug on December 29, 2011, 09:54:42 am
If you think of the User keyword function in Settings->Editor...->Syntax highlighting, then that would mean i have to add a keyword everytime i create an object of a class.
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: oBFusCATed on December 29, 2011, 10:19:57 am
I guess you're talking about semantic highlighting and C::B could not do it at the moment.

What Morten suggested is that if you want this feature, so much you can implement
it yourself and then provide a patch, so we can integrate it.
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: ptDev on December 29, 2011, 01:06:10 pm
I guess you're talking about semantic highlighting and C::B could not do it at the moment.

What Morten suggested is that if you want this feature, so much you can implement
it yourself and then provide a patch, so we can integrate it.

Come to think about it, semantic code completion would be nice too.
If, for example, one writes:

Code: c++
auto obj = new

...and then hits ctrl+space, it would be cool if C::B provides us a list of basic types, structs, classes, etc.
But there still is an ongoing effort in refactoring the code completion, so maybe a bit of patience, even when submitting patches, is advised.
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: DarkBug on January 11, 2012, 02:16:31 pm
@oBFusCATed: Sorry, i don't have time to implement this feature and provide a patch. I just suggest this feature for the next stable release of C::B.
Title: Re: Suggestion: syntax highlighting for classes and objects in C++
Post by: oBFusCATed on January 11, 2012, 02:25:55 pm
I know, but you don't even have time to search the forum, because this is the third or forth topic, about this feature request.

BTW: This is currently just impossible to implement, because scintilla doesn't support it natively (at the time of this post), for clarification search their mailing list/google group.