Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion elixir-smie.el
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@
(smie-rule-parent))))
((and (smie-rule-parent-p "OP")
(smie-rule-hanging-p))
(smie-rule-parent))))
(smie-rule-parent))
((smie-rule-parent-p "[")
(smie-rule-parent))
))
(`(:after . "{")
(cond
((smie-rule-hanging-p)
Expand Down
35 changes: 35 additions & 0 deletions test/elixir-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -1834,6 +1834,41 @@ cond do
end
")

(elixir-def-indentation-test indent-maps-inside-list
(:tags '(indentation))
"
[
%{
name: \"John Doe\",
email: \"[email protected]\"
},
%{
name: \"Jane Doe\",
email: \"[email protected]\",
},
%{
name: \"Josie Doe\",
email: \"[email protected]\",
},
]
"
"
[
%{
name: \"John Doe\",
email: \"[email protected]\"
},
%{
name: \"Jane Doe\",
email: \"[email protected]\",
},
%{
name: \"Josie Doe\",
email: \"[email protected]\",
},
]
")

;; We don't want automatic whitespace cleanup here because of the significant
;; whitespace after `Record' above. By setting `whitespace-action' to nil,
;; `whitespace-mode' won't automatically clean up trailing whitespace (in my
Expand Down