Gemfile and act accordingly. But you can also set it to t or nil to
skip the check.
+*** New user option 'ruby-bracketed-args-indent'.
+When it is set to nil, multiple consecutive open braces/brackets/parens
+result in only one additional indentation level.
+
** Thingatpt
---
;; No paren/curly/brace found on the same line.
((< (treesit-node-start found) parent-bol)
parent-bol)
+ ;; Nesting of brackets args.
+ ((and
+ (not (eq ruby-bracketed-args-indent t))
+ (string-match-p "\\`array\\|hash\\'" (treesit-node-type parent))
+ (equal (treesit-node-parent parent) found)
+ ;; Grandparent is not a parenless call.
+ (or (not (equal (treesit-node-type found) "argument_list"))
+ (equal (treesit-node-type (treesit-node-child found 0))
+ "(")))
+ parent-bol)
;; Hash or array opener on the same line.
((string-match-p "\\`array\\|hash\\'" (treesit-node-type found))
(save-excursion
(ruby-ts-deftest-indent "ruby-method-call-indent.rb")
(ruby-ts-deftest-indent "ruby-method-params-indent.rb")
(ruby-ts-deftest-indent "ruby-parenless-call-arguments-indent.rb")
+(ruby-ts-deftest-indent "ruby-bracketed-args-indent.rb")
(provide 'ruby-ts-mode-tests)