Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use specific astyle option file instead of “cmd_options” in workspace if had set "astyle.astylerc" #28

Open
heartacker opened this issue Feb 5, 2021 · 0 comments

Comments

@heartacker
Copy link

"astyle.astylerc": "${workspaceFolder}/.vscode/astylerc"

    "astyle.cmd_options": [
        // 使用kr风格
        "--style=kr",
        // 将tab转为4个空格
        "--convert-tabs",
        // 对于控制流程如果是当行的加入花括号
        "--add-braces",
        // 缩进case标签
        "--indent-switches",
        // 缩进标签
        "--indent-labels",
        // 缩进预处理
        "--indent-preprocessor",
        //缩进一行的注释
        "--indent-col1-comments",
        //缩进命名空间
        "--indent-namespaces",
        //控制关键字 后添加空格
        "--pad-header",
        // 操作符号添加空格
        "--pad-oper",
        //一行的块代码添加花括号
        "--add-brackets",
        //对于一行的代码保持不换行
        "--keep-one-line-blocks",
        // 缩进4个空格
        "--indent=spaces=4",
        "--min-conditional-indent=0",
        "--max-instatement-indent=40",
        //块之间添加空行
        "--break-blocks",
        //括号内的参数和括号不添加空格
        "--unpad-paren",
        // 指针符号贴近变量名
        "--align-pointer=name",
        // 引用符号贴近变量名
        "--align-reference=name"
        // 模式设置为C
        //"--mode=c"
]

when set the option cmd and option file at the same time. astyle format by option cmd ,
i thinks it should format by the stylerc rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant