-
Notifications
You must be signed in to change notification settings - Fork 53
Class fields hightlighting if field contains :: or <> in its type. #140
Comments
And also I see difference in std::cin and std::cout highlighting. It is really annoying to see that. |
color_coded was just recently (yesterday) updated to clang 3.9.0; would you mind checking out 5d7d4b7 and rebuilding to see if you have the same issue? libclang's AST representation is questionable, at best, which has led to issues like #2 With that said, Thank you for taking the time to open this ticket; color_coded's in a stable state, so we should be able to get you comfortable with it, given some config tweaks. |
So i've installed last color_coded plugin, but there was no difference in code higlighting after that. So I was looking for similar issues and found that my .color_coded whic was generated by YCM-Generator contains only
So then when I have added "isystem/usr/lib/clang/3.9.0/include" string to my color_coded file everything start working correctly. So the first question is : Do I have to add this string everytime manually to .color_coded file or maybe there is some parameters to YCM-Generator that can add it ? |
This line "-isystem/usr/lib/clang/3.9.0/include" solves that issue for my Ubuntu 14.04. But I've got laptop with Arch Linux which uses gcc 6.0(I've seen that some guy have got issue with gcc 6.0).
As I have seen in the README on Ubuntu you install libclang-3.9-dev (and man, please add commands that add repo with this version of clang to Ubuntu, because by default this repo isn't included, I can share them with you) . But on Arch Linux I haven't got that package. Maybe I have to build this package from source, because I don't see clang-3.9 packages in Arch repository? So the question for working of color_coded on Arch Linux is open, because I use it a lot in my work too. |
You shouldn't be including system headers for clang manually. Please share with my your |
I'm not using clang for compilation, I'm using gcc and simple Makefile. I've started with simple example to test color_coded and make good setup for C/C++ IDE in Vim. So plugin directory contains in I've included .color_code file there which was genereted by YCM-generator. As I said generated file just contains this:
|
Sorry for the confusion; I'm not asking what you're using to build your project, I'm asking what you're using for color_coded's backend. It sounds like you're using the default clang, since it downloaded during the configuration process. Similarly, when asking about The configs which YCM-generator gave you aren't needed. |
I unzipped your project and opened |
I just tried a fresh clone and manual build. Afterward, your test project still renders properly. Will you look through these commands and reply back with a similar post showing exactly the commands (or vim configuration) you used to build color_coded?
|
Here it is my installation log:
Here it is me .vimrc config:
|
And if I type :CCerror , then it shows me: |
Ah, that last bit of info is good. It looks like you might be experiencing this: #126 It's something you can fix, by adding some system include paths; ideally this can be done for you, behind the scenes, but it's only needed in some setups. |
@jeaye Yeah, you're right. I've found this comment very useful #126 (comment) . It references to FAQ of YCM plugin here . So all I have to do is to call |
Thanks, @melonaerial. I've updated the README. |
I've installed color_coded and used 'twilighted' colorscheme to test it.
As you can see on the image, class fields highlighted good in declaration. But in code fields that contain "::" or "<>" in their type name highlighted like classical vars, not like class fields. For example:
at line 45-49 all class fields highlighted correctly with cursive text. But at line 40, 63-65 they lighted like classical vars, not like class fields. But at line 40 and 62 variable m_data highlighted correctly.
And also hightlighting doesn't work if we use "." , but work with "->" for access the class field. You can see difference in lines 62 and 70 for access m_data field.
I don't know, maybe I need to do some more configuration for that plugin or it is real bug. How can i fix it or maybe help you to fix it ?
The text was updated successfully, but these errors were encountered: