.clang-format file support
Posted: Fri Apr 22, 2016 5:04 pm
Typically, when using a CLang-centric development process, I keep a .clang-format file at the project root, which is nothing but a dump I make out of one of the widely known style presets (e.g., google or LLVM). Afterwards, I change perhaps one or two things (wrap width 120, sort includes false, etc.). From that point on, I can format all files in the project room using those settings, and various plugins in various editors first search for a .clang-format file anywhere on the path of the file, and if not found, LLVM style is commonly used.
In CodeLite, I am having difficulty achieving this. Although there is a .clang-format file at the project root, it is not used. There are some options exposed through CodeLite preferences. But the options I have in my clang-format file are way more. One of the reasons could be that I am normally using clang and clang-format 3.8 (Ubuntu Xenial) and CodeLite is trying to use a clang-format 3.4 (Which is prehistoric!) that it would not get installed without.
Why is it this way and is there a workaround for this? I am not being able to use such a great lightweight editor mostly because of this. When I open old projects and hit save, things get real messy.
In CodeLite, I am having difficulty achieving this. Although there is a .clang-format file at the project root, it is not used. There are some options exposed through CodeLite preferences. But the options I have in my clang-format file are way more. One of the reasons could be that I am normally using clang and clang-format 3.8 (Ubuntu Xenial) and CodeLite is trying to use a clang-format 3.4 (Which is prehistoric!) that it would not get installed without.
Why is it this way and is there a workaround for this? I am not being able to use such a great lightweight editor mostly because of this. When I open old projects and hit save, things get real messy.