javascript - 如何在单个 .clang-format 文件中设置多种语言
我想为 java、javascript 和 c++ 制作一个单独的 .clang-format。我知道如何为单一语言导出示例配置,但不知道如何合并这三个配置文件。
答案#1
如何在单个文件中放置多种语言配置的示例:
---
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
Force pointers to the type for C++.
DerivePointerAlignment: false
PointerAlignment: Left
---
Language: JavaScript
Use 100 columns for JS.
ColumnLimit: 100
---
Language: Proto
Don't format .proto files.
DisableFormat: true
---
Language: CSharp
Use 100 columns for C#.
ColumnLimit: 100
...
