sublime-text中clang-format插件的配置

Wisansiiz
2024-07-14 / 0 评论 / 0 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2024年07月14日,已超过524天没有更新,若内容或图片失效,请留言反馈。

Custom style

{
    "BasedOnStyle": "Google",
    "IndentWidth": 4,
    "AlignAfterOpenBracket": true,
    "AlignConsecutiveAssignments": true,
    //# 连续声明时,对齐所有声明的变量名
    "AlignConsecutiveDeclarations": false,
    "MaxEmptyLinesToKeep": 4,
    "BreakBeforeBraces": "Attach",
    "AllowShortIfStatementsOnASingleLine": true,
    "IndentCaseLabels": true,
    "ObjCBlockIndentWidth": 4,
    "ObjCSpaceAfterProperty": true,
    "ColumnLimit": 0,
    "AlignTrailingComments": true,
    "SpaceAfterCStyleCast": true,
    "SpacesInParentheses": false,
    "SpacesInSquareBrackets": false,
    "TabWidth": 4,
    "UseTab": "Never",
    "AllowShortBlocksOnASingleLine": false,
    "AllowShortIfStatementsOnASingleLine": true,
    "AllowShortLoopsOnASingleLine": true,
    "BraceWrapping":{
        "AfterClass":             false,
        "AfterControlStatement":  false,
        "AfterEnum":              false,
        "AfterFunction":          false,
        "AfterNamespace":         false,
        "AfterObjCDeclaration":   false,
        "AfterStruct":            false,
        "AfterUnion":             false,
        "BeforeCatch":            false,
        "BeforeElse":             false,
        "IndentBraces":           false,
        "SplitEmptyFunction":     true,
        "SplitEmptyRecord":       true,
        "SplitEmptyNamespace":    true
    },
    "Cpp11BracedListStyle": true,
    "ColumnLimit": 80,
}

User setting

{
    "binary": "D:\\LLVM\\bin\\clang-format.exe",
    "style": "Custom",
    "format_on_save": true,
    "languages": ["C", "C++"]
}
0

评论 (0)

取消