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

Indenting not consistent with elm-format, even with cycling #55

Closed
fredcy opened this issue Jan 6, 2016 · 4 comments
Closed

Indenting not consistent with elm-format, even with cycling #55

fredcy opened this issue Jan 6, 2016 · 4 comments
Assignees

Comments

@fredcy
Copy link

fredcy commented Jan 6, 2016

If I write main = div [] [] then elm-format will render it as

main =
  div
    []
    []

When I try to enter code that way using elm-mode I cannot get the arguments to div to be indented by 2 relative to it no matter how I cycle by hitting the tab key. The closest I can get is this:

main =
  div
  []
  []

I'm using elm-mode-20160104.233.

@Bogdanp
Copy link
Collaborator

Bogdanp commented Jan 7, 2016

I'll try to address this and a few other inconsistencies within the next few weeks.

@Bogdanp Bogdanp self-assigned this Jan 7, 2016
@Bogdanp Bogdanp closed this as completed in 4761068 Jan 9, 2016
@fredcy
Copy link
Author

fredcy commented Jan 11, 2016

Thanks, that did fix the case I reported. But now I have a similar issue. The following code is as elm-format generates:

test =
  form
    [ action "foo" ]
    [ ol
        []
        [ li
            []
            [ text "foo" ]
        ]
    ]

I can't get elm-mode to align that line with [ li like that no matter how I cycle with Tab. I am using elm-mode-20160109.511 from elpa.

@Bogdanp
Copy link
Collaborator

Bogdanp commented Jan 12, 2016

Thanks for reporting! This should now be fixed. There's still some funkiness when it comes to indenting stuff like:

f = 
  ( a
  , b
  , div 
      []
      []
  )

That second [] will need cycling but it should let you cycle to the correct position.

@fredcy
Copy link
Author

fredcy commented Jan 12, 2016

Thanks, that's now working fine for me using elm-mode 20160112.133.

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

No branches or pull requests

2 participants