elixir-editors / elixir-editors/emacs-elixir

Incorrect indentation when maps are passed as parameters

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

Description

When typing a map as a parameter to a function, this is the indentation I get:

``` elixir
defp put_foo(map) do
Map.put(map, :foo, %{
bar: "baz"
})
end
```

I would expect something more like this:

``` elixir
defp put_foo(map) do
Map.put(map, :foo, %{
bar: "baz"
})
end
```

I get something similar, though not as bad, with lists:

``` elixir
defp put_foo(map) do
Map.put(map, :foo, [
:bar,
:baz
])
end
```

I would expect this (although I know this one is a little more opinionated):

``` elixir
defp put_foo(map) do
Map.put(map, :foo, [
:bar,
:baz
])
end
```

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.