diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-01-18 02:40:00 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2023-01-18 03:27:37 +0200 |
commit | 300ca6ac37250711b7d6484e0a870bf37e9e00cb (patch) | |
tree | 91ed050a3001d5d3b6ee57dec5fe7fb0cc0db5ec /test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb | |
parent | ac5516bd7d568bbcea4fe46273d4f44c891a71ae (diff) | |
download | emacs-300ca6ac37250711b7d6484e0a870bf37e9e00cb.tar.gz emacs-300ca6ac37250711b7d6484e0a870bf37e9e00cb.tar.bz2 emacs-300ca6ac37250711b7d6484e0a870bf37e9e00cb.zip |
ruby-ts-mode: Fix indent after operator or conditional
Make it match ruby-mode's indentation behavior.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--binary-indent-anchor):
New function.
(ruby-ts--indent-rules): Use it instead of a composite matcher.
Add a rule for 'conditional'.
(ruby-ts--assignment-ancestor, ruby-ts--is-in-condition)
(ruby-ts--endless-method): Remove.
* test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb:
Add examples.
Diffstat (limited to 'test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb')
-rw-r--r-- | test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb b/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb index 1a07ababc46..92d62f92e52 100644 --- a/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb +++ b/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb @@ -41,6 +41,19 @@ foo2 = 2 ) +foo > bar && + tee < qux + +1 .. 2 && + 3 + +a = foo(j, k) - + bar_tee + +qux = foo.fee ? + bar : + tee + # Local Variables: # mode: ruby-ts # End: |