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

C++11 'alignof' keyword not recognized #938

Closed
Leedehai opened this issue Aug 2, 2017 · 7 comments
Closed

C++11 'alignof' keyword not recognized #938

Leedehai opened this issue Aug 2, 2017 · 7 comments

Comments

@Leedehai
Copy link

Leedehai commented Aug 2, 2017

screen shot 2017-08-01 at 20 15 36

I know I could've tweak with the language setting file but updates can overwrite my modification...
@sean-mcmanus
Copy link
Contributor

It's a bug with the VS Code's default Dark theme. If you switch your theme to something like Monokai, you should see it as keyword colored. I remember a bug was filed on VS Code about this, but I haven't found it yet.

@Leedehai
Copy link
Author

Leedehai commented Aug 2, 2017

@sean-mcmanus This is the pull request last year, but it is still not in production yet.

@sean-mcmanus
Copy link
Contributor

@Leedehai No, the pull request last year is out. The problem is with the theme coloring you're using, which colors the alignof white instead of blue. The Monokai theme colors "alignof" correctly as a keyword.

However, there does appear to be another bug in that "alignof(" with a parenthesis is not being colored correctly. I've filed bug atom/language-c#246 for that.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Aug 2, 2017

The previous theming bug we filed got fixed for sizeof (see microsoft/vscode#22419 ), but it looks like there's an additional issue with alignof. I added a comment to that bug and will open a new bug if necessary.

@DenisYaroshevskiy
Copy link

Hi! Just a ping in case this would boost the ticket's priority)

@sean-mcmanus
Copy link
Contributor

@DenisYaroshevskiy This is bug atom/language-c#246, so it needs to be fixed there, so maybe you could upvote that issue? A fix was made in a forked repo of atom/language-c, but not the official repo, so someone could also to porting that fix.

@Colengms
Copy link
Contributor

This issue is external to cpptools. The TextMate grammar for C++ (in VS Code) is correctly identifying the token as keyword.operator.alignof.cpp. It's up to the theme to apply a color to it.

microsoft/vscode#80783 is tracking adding some C/C++ specific tokens to the default themes in VS Code. I commented there about alignof, specifically.

Closing this issue. If someone feels strongly that this should also be tracked in cpptools, let us know.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants