elixir-editors / elixir-editors/emacs-elixir
Inconsistent indentation in `with`
- Dominant language
- Emacs Lisp
- Stars
- 454
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
I have this gem of indentation in my code right now (and yes, that's how emacs wants it indented):
```elixir
def move_to_random_location(%{location_id: loc_id, id: id, exits: exits} = state) do
with true <- Enum.any?(exits),
info <- public_info(state),
%{from_id: new_loc_id} <- Enum.random(exits),
:ok <- World.Location.depart(loc_id, {{__MODULE__, id}, info, new_loc_id}),
{:ok, new_exits} <- World.Location.arrive(new_loc_id, {{__MODULE__, id}, info, loc_id}) do
%{state | location_id: new_loc_id, exits: new_exits}
else
false -> state
:not_in_location -> state
end
end
```
Contributor guide
Assessment
This issue has not been assessed yet.