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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
### Enhancements

* [Indentation] Indent listing inside square brackets. (#160)
* [Indentation] Ident correct after a binary sequence `<<1,2,3,4>>`.
* [Indentation] Indent of binary sequence inside match block
* [Indentation] Indent correct after a binary sequence `<<1,2,3,4>>`.
* [Indentation] Indent correct after oneline `def ... do:` function
* [Indentation] Correct behavior after last line in buffer. (#145)

Expand Down
4 changes: 4 additions & 0 deletions elixir-smie.el
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@

(defun elixir-smie-rules (kind token)
(pcase (cons kind token)
(`(:before . "OP")
(when (and (not (smie-rule-hanging-p))
(smie-rule-prev-p "OP"))
-2))
(`(:after . "OP")
(cond
((smie-rule-sibling-p) nil)
Expand Down
2 changes: 1 addition & 1 deletion test/elixir-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ defmodule ExampleTest do
end")

(elixir-def-indentation-test indent-binary-sequence-inside-match-block/2
(:expected-result :failed :tags '(indentation))
(:tags '(indentation))
"
case asd do
<<c1::5, c2::5, c3::5, c4::5, c5::5, c6::5, c7::2>> ->
Expand Down