-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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++ syntax highlighting broken by line break before array square bracket #85385
Comments
Looks like the the folks over at https://github.com/jeff-hykin/cpp-textmate-grammar are on top of this (as usual!). Once they've merged in their fix from jeff-hykin/better-cpp-syntax#423 I'll pull in the changes. |
@alexr00 @matter123 Great, but I think jeff-hykin/better-cpp-syntax#423 is not sufficient to fix this as it only seems to be about digits after the #define ARRAY_SIZE 10
int array
[ARRAY_SIZE];
// This is a comment that won't be formatted correctly. has the same problem.
Edit: jeff-hykin/better-cpp-syntax#423 has been closed in favor of jeff-hykin/better-cpp-syntax#437. |
@alexr00 jeff-hykin/better-cpp-syntax#437 has been merged to master (it's not yet in the released extension). I can confirm this fixes the formatting issue 😄 |
Excellent. I will pull in the change in a week or so. |
Any updates? Still open in 1.44.0. |
There is a different bug that is preventing us from getting the most recent grammar changes jeff-hykin/better-cpp-syntax#460 |
We have now pulled in all the recent cpp grammar changes. |
Steps to Reproduce:
// this is a comment
andint main() {
(both inclusive) is broken (i.e., the text is white).int array
and[42];
.This is especially important for deeply nested arrays, when the declaration of the array becomes too long to put it on one line.
In addition,
array
is blue if there is no whitespace (line break or space characters) before the opening square bracket, andarray
is white if there is whitespace. Is this another issue?Due to firewall restrictions I can't upload screenshots right now, sorry.
This might be related to #76225 (comment) and jeff-hykin/better-cpp-syntax#279.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: