vscode-clang-format
vscode-clang-format copied to clipboard
Is it necessary to use so many languege configures?
@xaverh According to http://clang.llvm.org/docs/ClangFormatStyleOptions.html . clang-format only use these languages.
- LK_None (in configuration: None) Do not use.
- LK_Cpp (in configuration: Cpp) Should be used for C, C++.
- LK_Java (in configuration: Java) Should be used for Java.
- LK_JavaScript (in configuration: JavaScript) Should be used for JavaScript.
- LK_ObjC (in configuration: ObjC) Should be used for Objective-C, Objective-C++.
- LK_Proto (in configuration: Proto) Should be used for Protocol Buffers (https://developers.google.com/protocol-buffers/).
- LK_TableGen (in configuration: TableGen) Should be used for TableGen code.
But we have 9 language configures now, I think we can only provide the languages which clang-format support directly. Some others can be alias for these languages, such as:
- c -> cpp
- objective-c -> objective-cpp
And some other editor has some languages with more than one aliases, so we can support it when it happens in vscode.
It's just a suggestion and can you think about it?
BTW: I think the configure assumeFilename should also be made a distinction between languages, so we can work with more than one language at the same time?
This is indeed a good suggestion, and it also touches on the discussion in #34. I have not come to a final conclusion yet but I'm open for ideas and contributions in regards to this. Primarily I'm a little bit hesitant, because of this being a breaking change (at least for some users).
Since I personally use this extension almost exclusively for C++ and my use case is also very simple (I'm not configuring this extension specifically at all in my settings.json
), I do not have very hard opinions either.
It would also be interesting to know, whether there are people who are willing to handle e.g. their C and C++ files differently.