diff options
| author | Wilhelm H Kirschbaum | 2023-04-02 11:26:02 +0200 |
|---|---|---|
| committer | Yuan Fu | 2023-04-04 23:01:21 -0700 |
| commit | eb0a9e463347b0191a07befcc3138db37f77b402 (patch) | |
| tree | 145868d3df59cf67169d04766eb3564d56643c57 /test | |
| parent | 830bf66dadbb4b9b9393ade53b890b5497bdf479 (diff) | |
| download | emacs-eb0a9e463347b0191a07befcc3138db37f77b402.tar.gz emacs-eb0a9e463347b0191a07befcc3138db37f77b402.zip | |
Improve list indentation for elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el:
(elixir-ts--argument-indent-offset): Add empty line check.
(elixir-ts--argument-indent-anchor): Change ERROR offset.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/elixir-ts-mode-resources/indent.erts | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts index ea5d9e62240..9ad604e5198 100644 --- a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | Code: | 1 | Code: |
| 2 | (lambda () | 2 | (lambda () |
| 3 | (setq indent-tabs-mode nil) | ||
| 4 | (elixir-ts-mode) | 3 | (elixir-ts-mode) |
| 5 | (indent-region (point-min) (point-max))) | 4 | (indent-region (point-min) (point-max))) |
| 6 | 5 | ||
| @@ -330,3 +329,22 @@ defmodule Foo do | |||
| 330 | end | 329 | end |
| 331 | end | 330 | end |
| 332 | =-=-= | 331 | =-=-= |
| 332 | |||
| 333 | Code: | ||
| 334 | (lambda () | ||
| 335 | (elixir-ts-mode) | ||
| 336 | (newline) | ||
| 337 | (indent-for-tab-command)) | ||
| 338 | |||
| 339 | Name: New list item | ||
| 340 | |||
| 341 | =-= | ||
| 342 | [ | ||
| 343 | :foo,$ | ||
| 344 | ] | ||
| 345 | =-= | ||
| 346 | [ | ||
| 347 | :foo, | ||
| 348 | $ | ||
| 349 | ] | ||
| 350 | =-=-= | ||