elixir-editors / elixir-editors/emacs-elixir

Indentation with a guard on a new line

Open
#488 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Emacs Lisp
Stars
454
Forks
93
PR merge metrics
No merged PRs in 30d

Description

If I just write code naturally and indent everything:

```elixir
def func(x)
when x.y = 1 do
abc
end
```
After `elixir-format`:

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

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

```elixir
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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.