Sorry everyone about the lack of comments in my code... I really had not intended for it to halt in this state. Bad habit of writing comments
after finishing a section of code, instead of with it
...
Btw clang's documentation parser doesn't seem to be as good as the built-in cc plugin's, or is it?
Yes, I ran into some annoying bugs in it (some comments fail to parse, sometimes clang dumps the entire file into a comment). However, the styling/generating of the output in this plugin is unfinished; some of the information that clang does provide (e.g. blocks @param, @return, ...) is discarded/used incorrectly.
When I complete the keyword 'while' for example, I get something like:
while(/*! condition !*/){
}
Is it the clang itself that completes the code like this? Can this behavior be disabled?
The actual text is provided by clang as optional output. It would be a fairly small change in the code to tell this plugin to ignore clang's suggested output.
For now I see that the inline Clang warning/error annotations have unconfigurable colours, style number 50. I guess Alpha0010 just chose a number ?
I reused the wxsmith generated code entry from the C++ lexer. Eventually it should probably get its own entry, but I did this since that style has the same meaning of "this text is not editable".
I am aware of that but I couldn't locate the piece of code that configures this yet. Can someone point me to the code in question so I can take care of that too?
stc->AnnotationSetStyle()Maybe I should make a merge from this plugin into the CC-plugin, just to make sure the same file is not parsed twice...
Nope don't do it. This is something that should be done in the sdk and the cc plugins should only feed it with data.
As far as I know scintilla doesn't have easy way to implement this, so this is why we've not investigated much time.
Eventual goal for this plugin was to provide clang powered data that other subsystems (including highlighting, searching, refactoring,...) in addition to CC (hence the plugin name I choose). This will have to be done in a way that data is mediated, so other future plugins can also provide these services.
Afaik the built-in cc plugin provides the semantic highlight for the data members currently. I use it and runs quite smooth and nice. I've even enhanced it a little further to color the class names also. I believe it won't hurt to implement this in clang plugin till it's implemented in sdk (which I don't think will ever happen though).
The one in the CC is just a hack that breaks in too many ways (it is not context aware, it is just global).
Yeah, it really is a hack. But if you follow certain coding/naming conventions (similar to C::B core) it *nearly* works without mistakes. I wrote this poor man's semantic highlighting in this technique since it (mostly) runs very fast, and requires no complicated lexer editing.