Closed yong580 closed 1 year ago
formatting result still keep tabWidth= 2
int hello() { printf("hello world\n"); return 0; } int main() { int i = 0; int b = 5; hello(); }
same question.
OK, i found the solution here. All we need to do is to create a .clang-format in our project or home directory, the content is simple:
.clang-format
IndentWidth: 4
Clangd uses it's own format file.
formatting result still keep tabWidth= 2
include
include
include
include
include
include
int hello() { printf("hello world\n"); return 0; } int main() { int i = 0; int b = 5; hello(); }