haxe-formatter
haxe-formatter copied to clipboard
Wrapping with call after type check
It seems confusing to have the .then
on the same indent level as the type check here:
class Main {
static function main() {
window.showErrorMessage("No Haxe configurations are available. Please provide the haxe.displayConfigurations setting.",
({title: "Edit settings"} : vscode.MessageItem))
.then(function(button) {
trace("");
});
}
}
The .then()
part didn't used to be wrapped into a new line.
there is two competing wrapping rules at play here: methodChain and callParameter wrapping. The first one wraps at .then
, but that doesn't satisfy maxLineLength
, so the second one wraps at the second call parameter.
I am afraid there is not much current wrapping logic can do here. This will have to wait until wrapping "version 5", where it learns to resolve multiple wrapping rules applying to the same line of code.