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 with a guard on a new line #488

Open
Nondv opened this issue Jan 17, 2022 · 2 comments
Open

Indentation with a guard on a new line #488

Nondv opened this issue Jan 17, 2022 · 2 comments
Labels

Comments

@Nondv
Copy link

Nondv commented Jan 17, 2022

If I just write code naturally and indent everything:

def func(x)
when x.y = 1 do
  abc
end

After elixir-format:

def func(x)
    when x.y = 1 do
  abc
end

and now when I add something after the function, the indentation breaks:

def func(x)
    when x.y = 1 do
  abc
end

    def id(x) do
      x
    end

also, shouldn't the mode's formatting be at least a little bit similar to the format tool?

@jsmestad
Copy link
Contributor

I hit this myself today with the exact same situation 😞

@taylor-gl
Copy link

Also happens for me

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

No branches or pull requests

4 participants