You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While editing a fork of elm-vim, I noticed some unexpected behaviors in the way autoindent works. Notably I found two issues.
else clauses in if expressions do not align with the parent if:
When I write an if else expression, I expect autoindent to align the else with a parent if, like so:
fun:Int->Boolfun x =if x ==0thenFalseelseTrue
Instead, when I type else, else do not align itself with the parent if. I get the following:
fun:Int->Boolfun x =if x ==0thenFalseelseTrue
Note that the former is the way let in expressions work and it is reasonable to assume that if else expressions 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:Lista->Listafun l =
tail l
|> reverse
|> drop 5
However, what I get is the following:
fun:Lista->Listafun 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.
The text was updated successfully, but these errors were encountered:
While editing a fork of elm-vim, I noticed some unexpected behaviors in the way autoindent works. Notably I found two issues.
else
clauses inif
expressions do not align with the parent if:When I write an
if else
expression, I expect autoindent to align theelse
with a parentif
, like so:Instead, when I type
else
,else
do not align itself with the parentif
. I get the following:Note that the former is the way
let in
expressions work and it is reasonable to assume thatif else
expressions 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:
However, what I get is the following:
Looking at the
indent/elm.vim
file, I found that those behaviors were intended, but the implementation just do not work.The text was updated successfully, but these errors were encountered: