Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation Cycling with else-if nested inside another if form not working correctly #90

Open
indigo0086 opened this issue Dec 17, 2016 · 3 comments

Comments

@indigo0086
Copy link

When attempting to do a nested else-if then form inside an if form the indentation adds extraneous spacing and you are unable to cycle proper indentation. I use elm-format to correct it of course but the cycling seems to not be elm specific. Asking around on twitter I was informed that it is using a haskell format instead of elm specific for tab cycling. Here is a small recording peek 2016-12-17 13-38

@mnannola
Copy link

mnannola commented Mar 18, 2017

I just ran into this as well, and not even on a nested if.

Here is the statement I have that causes an incorrect indentation on the second else if line

viewValidation model =
    let
        (color, message) =
            if model.password /= model.passwordAgain then
                ("red", "Passwords do not match!")
            else if String.length model.password < 9 then
                ("red", "Password needs to be longer than eight characters")
                    else if
            else
                ("green", "OK")

@kyepskee
Copy link

kyepskee commented Apr 23, 2020

I have the same issue, hope it gets resolved.
I'd just like to point out that the issue arises with a single else if, I think it's just not accounted for in indent. It doesn't need to be nested

@purcell
Copy link
Collaborator

purcell commented Apr 24, 2020

Yeah, it's all a bit inscrutable to me, tbh, since it began as a mangled haskell indentation system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants