forked from qt-creator/qt-creator
ClangFormat: Use relevant settings for each file
Existing Clang Format settings may not follow the project/global pattern but can be expected to be used for the indentation/formatting. So let's proceed with UI for global/project settings but use global settings only if there's no configuration found for the current file. Change-Id: I87c25ab3feb7e2e3deb0290848088657783cf972 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -34,12 +34,13 @@
|
||||
|
||||
namespace ClangFormat {
|
||||
|
||||
void createStyleFileIfNeeded(Utils::FileName styleConfigPath, bool isGlobal);
|
||||
// Creates the style for the current project or the global style if needed.
|
||||
void createStyleFileIfNeeded(bool isGlobal);
|
||||
|
||||
clang::format::FormatStyle currentProjectStyle();
|
||||
clang::format::FormatStyle currentGlobalStyle();
|
||||
|
||||
Utils::FileName currentStyleConfigPath();
|
||||
clang::format::FormatStyle currentStyle();
|
||||
// Is the style from the matching .clang-format file or global one if it's not found.
|
||||
clang::format::FormatStyle styleForFile(Utils::FileName fileName);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user