You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass a file like this through XML AutoFormat, you'll get that kind of indentation: continuation indents are 4 spaces by default.
But, if you run IntelliJ's autoformat, then it will indent like this:
On line 3, the content has been indented to 9 spaces, aligning with the first attributes of the line above after the tag name.
Describe the solution you'd like
Would be neat if there was an Xml Style / autoformat logic which supports this, and perhaps that should be the default style.
Have you considered any alternatives or workarounds?
Do nothing
Additional context
This indentation heuristic feels a bit unique? Not sure if implementing this would make a mess of the existing Autoformat / Style designs / interfaces.
What problem are you trying to solve?
Consider a small pom like this:
Observe the indentation (four spaces) of line 3.
If you pass a file like this through XML
AutoFormat
, you'll get that kind of indentation: continuation indents are 4 spaces by default.But, if you run IntelliJ's autoformat, then it will indent like this:
On line 3, the content has been indented to 9 spaces, aligning with the first attributes of the line above after the tag name.
Describe the solution you'd like
Would be neat if there was an Xml
Style
/ autoformat logic which supports this, and perhaps that should be the default style.Have you considered any alternatives or workarounds?
Do nothing
Additional context
This indentation heuristic feels a bit unique? Not sure if implementing this would make a mess of the existing
Autoformat
/Style
designs / interfaces.Are you interested in contributing this feature to OpenRewrite?
I might, but, not a big priority. This might be a decent "first issue"?
The text was updated successfully, but these errors were encountered: