C++ formatting: space before line-ending brace?
I feel like there must be an obvious way to do this, but I have combed the C++ style settings in Rider many times and I haven't been able to find it. I want to put a space between the ending parenthesis and the curly brace in control statements and function signatures, like so:
Current:
if (foo){
return;
}Desired:
if (foo) {
return;
}Is there a way to do this?
Please sign in to leave a comment.
You can change C/C++ → Braces Layout → Other Statements and Function declaration (for functions) to: At the end of the line (no space) to achieve this.
Note that you can also use Detect code style settings on a code snippet to infer code style based on the manually formatted snippet of code. You can find more information about this in Learn code syntax style rules from existing code.