1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
emacs/test/lisp/progmodes/ruby-mode-resources
Aaron Jensen 16a7051888 Fix indentation of keyword argument arrays/hashes in ruby-mode
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Check for ':' and
'=>' as previous tokens, and handle symbols ending with ':' to
properly indent keyword argument arrays and hashes when
ruby-bracketed-args-indent is nil.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol):
Handle arrays/hashes that are children of 'pair' nodes (keyword
arguments) to ensure consistent indentation.

* test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb:
Add test cases for keyword argument arrays and hashes with both
symbol-colon and hash-rocket syntax.

When ruby-bracketed-args-indent is nil, arrays and hashes used as
keyword argument values now indent by ruby-indent-level from the
line start, matching the documented behavior and fixing inconsistent
indentation (bug#74517).

(https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00939.html)
2025-11-26 01:31:12 +02:00
..
ruby-after-operator-indent.rb
ruby-block-indent.rb
ruby-bracketed-args-indent.rb Fix indentation of keyword argument arrays/hashes in ruby-mode 2025-11-26 01:31:12 +02:00
ruby-method-call-indent.rb
ruby-method-params-indent.rb
ruby-parenless-call-arguments-indent.rb
ruby-ts.rb
ruby.rb ruby-syntax-propertize: Add exception for /= 2025-09-16 02:17:13 +03:00