[cfe-dev] C++ Semantic highlighting and YouCompleteMe
Davit Samvelyan via cfe-dev
cfe-dev at lists.llvm.org
Sun Dec 27 11:04:11 PST 2015
Thanks a lot,
After looking at the color_coded and a little more research I found these
2 functions created specifically for the syntax highlighting purpose:
clang_tokenize() and clang_annotateTokens()
On Fri, Dec 25, 2015 at 6:40 PM, Benjamin Kramer <benny.kra at gmail.com>
> On Fri, Dec 25, 2015 at 2:39 PM, Davit Samvelyan via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > Hi,
> > Sorry if this email is off topic.
> > Today I've got this sticky idea, to do a semantic highlighting of C++
> > in Vim using YouCompleteMe's infrastructure.
> > For the start I would like to be able get class, namespace, enum...
> > and highlight them.
> > So I dug in, and didn't find anything similar in the libclang C API (the
> > used by YCM).
> > I'm not sure how to do it right with the C++ API: to traverse the whole
> > or there is a better/cheaper way to do it? (for example judging by its
> > ASTContext::getTypes() is doing something similar)
> > So if anyone is interested in the topic and is willing to help me by
> > initial direction or guiding me, and if I will be allowed to add such
> > functionality into the libclang C API :) I will be glad to work on this.
> There is color_coded  which does semantic highlighting in vim via
> libclang, maybe you can take some ideas from it.
> - Ben
>  https://github.com/jeaye/color_coded
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev