-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Indent expressions when converting to object initializer #76334
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
Indent expressions when converting to object initializer #76334
Conversation
|
@JoeRobich @ToddGrun ptal |
|
|
||
| protected TExpressionSyntax Indent(TExpressionSyntax expression, IndentationOptions indentationOptions) | ||
| { | ||
| var insertionText = indentationOptions.FormattingOptions.UseTabs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, perhaps my mental model of UseTab, TabSize, and IndentSize are wrong, but I thought that the indentation was always IndentSize spaces wide and that could use 1 or more tabs based on TabSize.
UseTabs = true
TabSize = 2
IndentSize = 4
each indent would be \t\t.
UseTabs = false
TabSize = 2
IndentSize = 4
each indent would be \s\s\s\s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are correct. this doesn't properly implement the desired indentation logic. I will fixup. Nice catch.
Fixes #46665