elixir-editors / elixir-editors/emacs-elixir

`cond` blocks inside `with/1` seems to indent to wrong level

Open
#319 0 comments 0 reactions 0 assignees View on GitHub
indentation
Dominant language
Emacs Lisp
Stars
454
Forks
93
PR merge metrics
No merged PRs in 30d

Description

I would assume that a `cond`-block should be indended by one level when used within a `with/1`, but it seems to be on the same line as the content on the left side of the arrow.

Current:

``` elixir
with(
foo <-
cond do
bar ->
bar

baz ->
baz
end,
do: :ok
)
```

Expected:

``` elixir
with(
foo <-
cond do
bar ->
bar

baz ->
baz
end,
do: :ok
)
```

I can provide a failing unit test if others agree that my expected indentation in fact should be the expected indentation.

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.