Closed OyvindSabo closed 4 years ago
Perhaps the easiest way to solve this in a robust way would be to not add the globally selected indentation until after the final query has been recreated. Then there will be no need to struggle with working around indentations appearing in the middle of a line when a query starts in the middle of a line. When cheking whether lines should wrap, we can just use a max line length equal to the specified max line length minus the global indentation.
Consider that we want to format the following query with a max line length of 70:
With an indentation of 0 spaces it is formatted like this (as expected):
However, with an indentation of 20 spaces it is formatted like this:
I would expect it to be formatted like this: