Skip to content

Remove "=" & left-assoc opers from "OP" regex. Fixes #18. #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2014
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: 1 addition & 2 deletions elixir-smie.el
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"===" "!==" ; comp3
"==" "!=" "<=" ">=" ; comp2
"<" ">" ; comp1
"+" "-" "*" "/" "=" "|" "!" "^" "@" ; op1
"&&" "||" "<>" "++" "--" "**" "//" "::" "<-" ".." "/>" "=~" ; op2 (minus ->)
"xor" "|>" ; http://elixir-lang.org/docs/stable/Kernel.html
)
Expand Down Expand Up @@ -320,7 +319,7 @@ Return non-nil if any line breaks were skipped."
(`(:after . "end") 0)
(`(:after . ,(or `"do"))
elixir-smie-indent-basic)
(`(:list-intro . ,(or `"do")) t)))
(`(:list-intro . ,(or `"do" `";")) t)))

(define-minor-mode elixir-smie-mode
"SMIE-based indentation and syntax for Elixir"
Expand Down
17 changes: 10 additions & 7 deletions test/elixir-mode-indentation-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,23 @@ defmodule FooBar do
end")

(elixir-def-indentation-test indents-after-empty-line
(:expected-result :failed) ; #18
()
"
def foo do
a = 2

b = a + 3
b = a + 3

c = a + b"
c = a * b
end"
"
a = 2

b = a + 3
def foo do
a = 2

c = a + b")
b = a + 3

c = a * b
end")

(elixir-def-indentation-test indents-function-calls-without-parens ()
"
Expand Down