neoclide / coc-prettier

Prettier extension for coc.nvim.
MIT License
546 stars 48 forks source link

"prettier.tabWidth": 4 This setting does not work in c/cpp files ,is it always use google code style? #160

Closed yong580 closed 1 year ago

yong580 commented 1 year ago

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(); }

zwjaaa commented 1 year ago

same question.

zwjaaa commented 1 year ago

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:

IndentWidth: 4

chemzqm commented 1 year ago

Clangd uses it's own format file.