absolute indentation: the indentation one would get if the whole file were formatted; or
relative indentation: keep the indentation relative to the previous lines, even if those are not indented correctly and are not in the range of lines to format
Judging from the tests, the relative indentation has been adopted; but I could see both cases being valid.
Are we ok with relative indentation by default?
Would we be ok to add a new parameter to specify absolute indentation?
What’s the expected behavior? One could expect:
- absolute indentation: the indentation one would get if the whole
file were formatted; or
- relative indentation: keep the indentation relative to the previous
lines, even if those are not indented correctly and are not in the
range of lines to format
Judging from the tests, the relative indentation has been adopted; but
I could see both cases being valid.
Are we ok with relative indentation by default?
Would we be ok to add a new parameter to specify absolute indentation?
Any opinion/advice?
IMO relative indentation is more useful. It doesn't make much sense if
you try to format a specific block of code but the indentation is only
reasonable if the whole file was already formatted.
That is to say, if I understand the PR correctly, I don't think there's
a bug here.