File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 44
55### Enhancements
66
7+ * [ Indentation] Continue of indentation in multiple line assignment.
78 * [ Indentation] Always indent with only 2 spaces except when function arguments span multiple lines.
89 * [ Indentation] Fix the indentation for mixed matchings.
910 * [ Indentation] Pipe |> indentation works correctly.
Original file line number Diff line number Diff line change 117117
118118(defvar elixir-smie--operator-regexp
119119 (rx (or " <<<" " >>>" " ^^^" " ~~~" " &&&" " |||" " ===" " !==" " ==" " !=" " <="
120- " >=" " <" " >" " &&" " ||" " <>" " ++" " --" " //" " />" " =~" " |>" )))
120+ " = " " >=" " <" " >" " &&" " ||" " <>" " ++" " --" " //" " />" " =~" " |>" )))
121121
122122(defvar elixir-smie--block-operator-regexp
123123 (rx " ->" (0+ nonl)))
283283
284284 ; ; Closing paren on the other line
285285 (`(:before . " (" )
286- (smie-rule -parent ))
286+ (unless smie--parent 0 ))
287287
288288 (`(:before . " ;" )
289289 (cond
Original file line number Diff line number Diff line change 246246" )
247247
248248(elixir-def-indentation-test indent-continuation-lines-assignment
249- (:expected-result :failed
250- :tags '(indentation))
249+ (:tags '(indentation))
251250 "
252251some_var =
253252some_expr
@@ -256,6 +255,22 @@ some_var =
256255 some_expr
257256" )
258257
258+ (elixir-def-indentation-test indent-continuation-lines-assignment/2
259+ (:tags '(indentation))
260+ "
261+ next_fun =
262+ case raw do
263+ true -> &IO.each_binstream(&1, line_or_bytes)
264+ false -> &IO.each_stream(&1, line_or_bytes)
265+ end
266+ " "
267+ next_fun =
268+ case raw do
269+ true -> &IO.each_binstream(&1, line_or_bytes)
270+ false -> &IO.each_stream(&1, line_or_bytes)
271+ end
272+ " )
273+
259274(elixir-def-indentation-test indent-last-commented-line
260275 ()
261276 "
You can’t perform that action at this time.
0 commit comments