Skip to content

Commit

Permalink
Fix indentation after multiline declarations.
Browse files Browse the repository at this point in the history
Fixes #168
  • Loading branch information
kassio committed Sep 6, 2016
1 parent f749f66 commit 3494a9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions indent/elixir.vim
Expand Up @@ -89,6 +89,7 @@ function! s:indent_opened_symbol(ind)
end
elseif s:metadata().opened_symbol < 0
let ind = get(b:, 'old_ind', a:ind + (s:metadata().opened_symbol * &sw))
let ind = float2nr(ceil(floor(ind)/&sw)*&sw)
return ind <= 0 ? 0 : ind
else
return a:ind
Expand Down
10 changes: 5 additions & 5 deletions spec/indent/lists_spec.rb
Expand Up @@ -162,15 +162,15 @@ def double(x) do
EOF
end

pending 'correct indentation after long map list' do
it 'correct indentation after long map list' do
expect(<<-EOF).to be_elixir_indentation
defmodule Module do
@person1 {name: "name",
@person1 { name: "name",
age: 18,
enabled?: true}
@person2 {name: "other name",
enabled?: true }
@person2 { name: "other name",
age: 21,
enabled?: false}
enabled?: false }
end
EOF
end
Expand Down

0 comments on commit 3494a9d

Please sign in to comment.