I have the following CommentPragmas setting:
CommentPragmas: 'MARKER'
And I expect this to make clang-format (version 8.0.0) ignore the comments in this piece of code:
enum bar {
// MARKER: foo
hello = 1
// MARKER: foo
};
However, clang-format indents these comments (aligning them with hello = 1
). Am I doing something wrong?
You're not doing anything wrong, this is just what clang-format does. CommentPragmas
prevents breaking comments into multiple lines, but does not prevent indenting them.
I had thought this was documented, but now I see that it isn't. :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With