-
Notifications
You must be signed in to change notification settings - Fork 100
Description
While editing a fork of elm-vim, I noticed some unexpected behaviors in the way autoindent works. Notably I found two issues.
-
elseclauses inifexpressions do not align with the parent if:
When I write anif elseexpression, I expect autoindent to align theelsewith a parentif, like so:fun : Int -> Bool fun x = if x == 0 then False else True
Instead, when I type
else,elsedo not align itself with the parentif. I get the following:fun : Int -> Bool fun x = if x == 0 then False else True
Note that the former is the way
let inexpressions work and it is reasonable to assume thatif elseexpressions would work the same way.
This is a non-issue when using a snippet insertion plugin such as UltiSnip. However, having the base indent plugin work is a nice goal to have. -
Operators starting a new line do not in indent.
When using the pipe operator especially, one expects that the line is indented such as:fun : List a -> List a fun l = tail l |> reverse |> drop 5
However, what I get is the following:
fun : List a -> List a fun l = tail l |> reverse |> drop 5
Looking at the indent/elm.vim file, I found that those behaviors were intended, but the implementation just do not work.