Environment
- OS and Version: Arch Linux
- VS Code Version: 1.117.0
- C/C++ Extension Version: 1.32.1
- If using SSH remote, specify OS of remote machine: No
Bug Summary and Steps to Reproduce
Bug Summary:
When passing parameters to a function using a composite font style, if a struct is passed, the indentation position of the first member during initialization meets expectations, but starting from the second member, its indentation unexpectedly increases by one level.
Steps to reproduce:
- Define a multi-member struct
- Define a function that accepts this struct
- Call this function, passing the struct as a compound literal, and assign values to each member of the struct using multiple lines of code.
- Call vcFormat to format
Expected behavior:
Starting from the second member, the indentation should be the same as the first member
This is my vcFormat configuration:
Configuration and Logs
settings.json:
{
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true,
"C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "sameLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "sameLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "sameLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "sameLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "sameLine",
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": true,
"C_Cpp.vcFormat.space.betweenEmptyBraces": true,
"C_Cpp.vcFormat.newLine.scopeBracesOnSeparateLines": true,
"C_Cpp.vcFormat.indent.preprocessor": "oneLeft",
"C_Cpp.vcFormat.space.afterKeywordsInControlFlowStatements": false,
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "ignore",
"C_Cpp.vcFormat.indent.caseContentsWhenBlock": true,
"C_Cpp.vcFormat.indent.caseLabels": true,
"C_Cpp.formatting": "vcFormat",
}
No additional configuration files are used; this is configuration related to vcFormat
Other Extensions
No response
Additional context
No response
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When passing parameters to a function using a composite font style, if a struct is passed, the indentation position of the first member during initialization meets expectations, but starting from the second member, its indentation unexpectedly increases by one level.
Steps to reproduce:
Expected behavior:
Starting from the second member, the indentation should be the same as the first member
This is my vcFormat configuration:
Configuration and Logs
settings.json: { "C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true, "C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "sameLine", "C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "sameLine", "C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "sameLine", "C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "sameLine", "C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "sameLine", "C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": true, "C_Cpp.vcFormat.space.betweenEmptyBraces": true, "C_Cpp.vcFormat.newLine.scopeBracesOnSeparateLines": true, "C_Cpp.vcFormat.indent.preprocessor": "oneLeft", "C_Cpp.vcFormat.space.afterKeywordsInControlFlowStatements": false, "C_Cpp.vcFormat.space.pointerReferenceAlignment": "ignore", "C_Cpp.vcFormat.indent.caseContentsWhenBlock": true, "C_Cpp.vcFormat.indent.caseLabels": true, "C_Cpp.formatting": "vcFormat", } No additional configuration files are used; this is configuration related to vcFormatOther Extensions
No response
Additional context
No response