Clang Indent

Lazyvim Clang format adjust

  • Create your project
mkdir myProject
cd myProject

touch .clang-format
  • Edit .clang-format file (Write as below)
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never
  • Then you can begin your coding, lazyvim will format it as 4 indentwidth
๐Ÿ“ Note

You can place this .clang-format file on ~/
and clang will search from parent dir
then this will equal to global configuration