branch: elpa/swift-mode commit b97b570bd93499bfd63a7f08b01c82b09851944b Author: uk-ar <yuuki....@gmail.com> Commit: uk-ar <yuuki....@gmail.com>
Fix indent rule for '(' and pass all test --- swift-mode.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 21a6829..30e8b63 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -443,8 +443,12 @@ (smie-rule-parent 0))) (`(:after . "(") - (if (smie-rule-parent-p "(") 0 - (smie-rule-parent swift-indent-offset))) + (cond + ((smie-rule-parent-p "(") 0) + ((and (smie-rule-parent-p "." "func") + (not (smie-rule-hanging-p))) 1) + (t (smie-rule-parent swift-indent-offset)))) + (`(:before . "(") (cond ((smie-rule-next-p "[") (smie-rule-parent))