Open Quuxplusone opened 3 years ago
Bugzilla Link | PR51101 |
Status | NEW |
Importance | P enhancement |
Reported by | NN (nn1436401@gmail.com) |
Reported on | 2021-07-14 22:13:41 -0700 |
Last modified on | 2021-07-16 03:07:42 -0700 |
Version | trunk |
Hardware | PC Windows NT |
CC | dblaikie@gmail.com, djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org, mydeveloperday@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Here are C++ formatting rules that Visual Studio understands:
https://docs.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties?view=vs-2019
Here are C++ formatting rules understood by ReSharper C++:
https://www.jetbrains.com/help/resharper/EditorConfig_CPP_CppBlankLinesPageScheme.html
To be clear, the feature request is that you would like clang-format to support parsing .editorconfig files directly as an alternative to .clang-format files?
Yes.
It solves few issues with the current approach:
Well known file.
All editors today understand editorconfig but not clang-format.
By understand I mean highlighting or visual editing.
Filtering rules: Today you must do it externally by calling or not calling
clang-format for needed files.
Forward compatibility: Today if you specify option from future clang-format
fails.
Editorconfig format requires you to not fail in such case.
I think generally as an idea this is pretty good, I guess perhaps to begin with it might be nice to have a .editorconfig to .clang-format converter
That is something that could be developed as a standalone. (great little starter project for someone!)
There are likely aspects of .editorconfig which clang-format doesn't support
But probably it would be good to take a deeper look at where these is overlap and where there isn't
its might open up new avenues for new functionality to be added to clang-format.