Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting not fully applied #67

Open
dunpyl opened this issue May 24, 2018 · 5 comments
Open

Syntax highlighting not fully applied #67

dunpyl opened this issue May 24, 2018 · 5 comments

Comments

@dunpyl
Copy link

dunpyl commented May 24, 2018

I installed the plugin via Vundle per the instructions. When I try to highlight the following small snippet:

    class Foo { 
        Function(double variable);
        MyType foo;
    }

It doesn't highlight the word Function like it does in the screenshot. It also doesn't doesn't highlight the word MyType.

I checked the highlight group and for both words it's cBlock.

What's wrong?

@Maktm
Copy link

Maktm commented Aug 12, 2018

I'm also having trouble with highlighting declarations. I've configured let g:cpp_class_decl_highlight = 1 but code like CustomType a; doesn't highlight CustomType even though using :hi I can see that cppStructure is already linked to Structure which is colored in. Not sure what the issue is.

@rwolst
Copy link

rwolst commented Aug 20, 2019

I also have this issue, I would really like MyType to be highlighted the same colour as for example int. Does anyone have a fix?

@octol
Copy link
Owner

octol commented Aug 21, 2019

CustomType a;

You're not going to be able to highlight your own types in this syntax without some kind of compiler backend, so it's a known limitation that it unlikely to be addressed anytime soon.

@rwolst
Copy link

rwolst commented Aug 21, 2019

I'm probably showing my lack of knowledge of how things work in the background here, but wouldn't this just require a regex e.g. class (\w+) on the file in question, along with its header imports?

Perhaps it is determining which files to look in that is the hard part.

@deeingasha
Copy link

It's been ages but did anyone figure it out or find another syntax highlighting solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants