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

Module attributes with a comma break indentation for the rest of the file (sometimes) #336

Closed
manukall opened this issue Apr 19, 2016 · 3 comments · Fixed by #337
Closed

Comments

@manukall
Copy link

The following code breaks the indentation for the rest of the file:

defmodule TestIndentation do
  import Enum
  @att %{ab: "cd",
         de: "fg"}
| <-- cursor is here
end

If I remove the import Enum line or the line-break after the comma, everything is fine.

Please let me know if I can help narrow this down further. I'm using spacemacs and everything is up to date, if that's relevant.

@utkarshkukreti
Copy link

For me, even the @att line is indented wrong:

Expected:

defmodule TestIndentation do
  import Enum
  @att %{ab: "cd",
         de: "fg"}
  IO.inspect @att
end

Actual:

defmodule TestIndentation do
  import Enum
@att %{ab: "cd",
       de: "fg"}
IO.inspect @att
end

@utkarshkukreti
Copy link

If I add a new line after import Enum, it works fine:

Expected and Actual:

defmodule TestIndentation do
  import Enum

  @att %{ab: "cd",
         de: "fg"}
  IO.inspect @att
end

@tonini
Copy link
Contributor

tonini commented Apr 19, 2016

Thanks for the report guys 👍

It's fixed on fc20276, just wait until melpa.org build the latest alchemist package from master before package-installusage.

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

Successfully merging a pull request may close this issue.

3 participants