thomasjo / atom-ide-cpp

C/C++ language support for Atom-IDE
33 stars 4 forks source link

Implement code formatting on save #21

Open AlexGustafsson opened 5 years ago

AlexGustafsson commented 5 years ago

It would be nice to have code formatting before saving (or at least the ability to format the code via a command). On macOS clang-format comes installed alongside clangd when installing llvm through brew. To my knowledge it does on Ubuntu (and I'm sure it does on other distributions) as well via the package clang.

I guess the plugin could decide to use a default style such as llvm or google if none is defined in a .clang-format file.