aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ruby-ts-mode: Fix indentation for string_array closerDmitry Gutov2023-12-241-0/+4
| | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Fix indentation for string_array closer.
* (ruby-ts--indent-rules): Add a rule for continuation of a hash pairDmitry Gutov2023-01-191-0/+6
| | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Add a rule for continuation of a hash pair. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Add examples.
* (ruby-ts--parent-call-or-bol): Handle more cases with nested literalsDmitry Gutov2023-01-191-0/+17
| | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol): Handle more cases with nested literals. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Add examples.
* (ruby-ts--statement-container-regexp): Remove "parenthesized_statements"Dmitry Gutov2023-01-191-0/+8
| | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--statement-container-regexp): Remove "parenthesized_statements", it's not really a statement container, not one we'd use for indentation alignment anyway. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Add examples.
* ruby-ts-mode: Obey the option ruby-method-call-indentDmitry Gutov2023-01-181-0/+1
| | | | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--method-call-indent-p): New function. (ruby-ts--indent-rules): Use it. * test/lisp/progmodes/ruby-ts-mode-tests.el: Run indent test for ruby-method-call-indent.rb. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Add explicit value for ruby-method-call-indent.
* ruby-ts-mode: Obey the option ruby-after-operator-indentDmitry Gutov2023-01-181-0/+3
| | | | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--after-op-indent-p): New function. (ruby-ts--indent-rules): Use it. * test/lisp/progmodes/ruby-ts-mode-tests.el: Run indent test for ruby-after-operator-indent.rb. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: Make sure indentation vars are at their default values.
* ruby-ts-mode: Fix indent after operator or conditionalDmitry Gutov2023-01-181-0/+13
| | | | | | | | | | | | | | 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.
* ruby-ts-mode: Fix/change indentation of a continuation method callDmitry Gutov2023-01-181-0/+13
| | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Fix/change indentation of a continuation method call. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: New examples.
* ruby-ts-mode: Fix indent inside parenthesized_expr and else/end after unlessDmitry Gutov2023-01-181-0/+10
| | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Fix indentation for parenthesized_expression and else/end after 'unless'. * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: New examples.
* ruby-ts-mode: Fix the rules for hanging arrays and hashesDmitry Gutov2023-01-181-0/+23
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Fix the rules for hanging arrays and hashes (to line up to parent-bol instead of the opening brace). * test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb: New file with examples. * test/lisp/progmodes/ruby-ts-mode-tests.el: Use it here.