Skip to content

Instantly share code, notes, and snippets.

@saloniig

saloniig/.cpp Secret

Created June 28, 2021 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saloniig/1b7531327a80be6e92be8236964a69a0 to your computer and use it in GitHub Desktop.
Save saloniig/1b7531327a80be6e92be8236964a69a0 to your computer and use it in GitHub Desktop.
File
FormatStyle Style = getLLVMStyle();
Style.AccessModifierOffset = -4;
Style.AlignEscapedNewlines = FormatStyle::ENAS_DontAlign;
Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
Style.AlignOperands = FormatStyle::OAS_DontAlign;
Style.AlignTrailingComments = false;
Style.AllowAllArgumentsOnNextLine = false;
Style.AllowAllConstructorInitializersOnNextLine = false;
Style.AllowAllParametersOfDeclarationOnNextLine = false;
Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_TopLevelDefinitions;
Style.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_TopLevel;
Style.BinPackArguments = true;
Style.BinPackParameters = true;
Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
Style.BreakBeforeBraces = FormatStyle::BS_Custom;
Style.BraceWrapping.AfterCaseLabel = true;
Style.BraceWrapping.AfterClass = true;
Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never;
Style.BraceWrapping.AfterEnum = true;
Style.BraceWrapping.AfterFunction = true;
Style.BraceWrapping.AfterStruct = true;
Style.BraceWrapping.AfterUnion = true;
Style.BraceWrapping.AfterExternBlock = true;
Style.BraceWrapping.BeforeCatch = false;
Style.BraceWrapping.BeforeElse = false;
Style.BraceWrapping.BeforeWhile = false;
Style.BreakConstructorInitializers = FormatStyle::BCIS_Haiku;
Style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
Style.IndentCaseLabels = true;
Style.IndentWidth = 4;
Style.InsertBraces = FormatStyle::BIS_WrapLikely;
Style.TabWidth = 4;
Style.MaxEmptyLinesToKeep = 2;
Style.PointerAlignment = FormatStyle::PAS_Left;
Style.UseTab = FormatStyle::UT_Always;
Style.SpaceAfterCStyleCast = false;
Style.SpaceAfterTemplateKeyword = false;
Style.SpaceBeforeParens = FormatStyle::SBPO_Haiku;
Style.AllowCommentsToIndentOneLevelMore = FormatStyle::IC_True;
Style.AllowIndentMultiLineForLoop = FormatStyle::IML_True;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment