diff --git a/elixir-smie.el b/elixir-smie.el index b6984429..bc419522 100644 --- a/elixir-smie.el +++ b/elixir-smie.el @@ -53,14 +53,7 @@ ,regexp) (pushnew `(,',regex-name . ,(upcase (symbol-name ',name))) elixir-syntax-class-names)))) - (elixir-smie-define-regexp-opt op - "<<<" ">>>" "^^^" "~~~" "&&&" "|||" ; op3 - "===" "!==" ; comp3 - "==" "!=" "<=" ">=" ; comp2 - "<" ">" ; comp1 - "&&" "||" "<>" "++" "--" "**" "//" "::" "<-" ".." "/>" "=~" ; op2 (minus ->) - "xor" "|>" ; http://elixir-lang.org/docs/stable/Kernel.html - ) + (elixir-smie-define-regexp-opt op "&&" "||" "!") (elixir-smie-define-regexp dot "\\.") (elixir-smie-define-regexp comma ",") (elixir-smie-define-regexp -> "->") @@ -290,7 +283,6 @@ Return non-nil if any line breaks were skipped." (smie-rule-parent elixir-smie-indent-basic) elixir-smie-indent-basic))) (`(,_ . ,(or `"COMMA")) (smie-rule-separator kind)) - (`(:after . "=") elixir-smie-indent-basic) (`(:after . "end") 0) (`(:after . ,(or `"do")) elixir-smie-indent-basic) diff --git a/test/elixir-mode-indentation-tests.el b/test/elixir-mode-indentation-tests.el index 88965142..855e9c04 100644 --- a/test/elixir-mode-indentation-tests.el +++ b/test/elixir-mode-indentation-tests.el @@ -399,3 +399,37 @@ end") " [1.2, 3.4]") + +(elixir-def-indentation-test indent-after-operator () + " +defmodule Banana do +def start do +a = \"\" <> \"?\" + +case bar do +z -> 1 +end + +case foo do +?x -> x +end + +end +end +" + " +defmodule Banana do + def start do + a = \"\" <> \"?\" + + case bar do + z -> 1 + end + + case foo do + ?x -> x + end + + end +end +")