hhvm / hack-mode

A Emacs major mode for editing Hack code
GNU General Public License v3.0
11 stars 11 forks source link

Wrong indentation for multiline instance method calls #29

Open kq-li opened 5 years ago

kq-li commented 5 years ago

When spanning multiple lines, instance method calls don't have the expected indentation. For example:

Expected:

$node->query()
  ->selectByLambda($node ==>
    checkValid($node),
  )
  ->whereLambda(
    $node ==> condition($node),
  );

Actual:

$node->query()
  ->selectByLambda($node ==>
                   checkValid($node),
                   )
  ->whereLambda(
  $node ==> condition($node),
);
Wilfred commented 4 years ago

This is much improved now. Indenting now gives:

$node->query()
  ->selectByLambda($node ==>
  checkValid($node),
)
  ->whereLambda(
  $node ==> condition($node),
);

which is correct, apart from the second method call.