I am using vim-autoformat
, which uses clang-format
as external formatter.
It seems that clang-format
won't indent the C++ #pragma
. For example:
#include <omp.h>
#include <cstdio>
int main()
{
#pragma omp parallel for
for (int i = 0; i < 10; ++i)
{
puts("demo");
}
return 0;
}
I would like to have it formatted into :
#include <omp.h>
#include <cstdio>
int main()
{
#pragma omp parallel for
for (int i = 0; i < 10; ++i)
{
puts("demo");
}
return 0;
}