Open
Description
indent-according-to-mode
is called in:
- In
newline-and-indent
. - In
electric-indent-mode
after\n
has been inserted. - In
evil-open-above
. - In
evil-open-below
.
Each of these cases is same: it is to semantically continue previous line. So we need:
- If previous line ends with operator, continue expression.
- If inside parenthesized expression, continue on the level of the expression.
- Lacking other context continue same indentation block.
Note that haskell-indentation
already has haskell-indentation-newline-and-indent
that touches this problem but hard to say how good it is.
Reference: syl20bnr/spacemacs#5010, syl20bnr/spacemacs#621, syl20bnr/spacemacs#3162, #896
Metadata
Metadata
Assignees
Labels
No labels