I want to make a single .clang-format for: java, javascript and c++. I know how to dump example configurations for a single language but dont't know how to merge those 3 config files.
I want to make a single .clang-format for: java, javascript and c++. I know how to dump example configurations for a single language but dont't know how to merge those 3 config files.
Share Improve this question asked Jun 26, 2020 at 17:21 Łukasz GrunerŁukasz Gruner 3,2293 gold badges30 silver badges28 bronze badges1 Answer
Reset to default 7Example on how to put multiple language configurations in a single file:
---
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
...
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744919551a4601045.html
评论列表(0条)