Function: ruby-ts--align-chain

ruby-ts--align-chain is a byte-compiled function defined in ruby-ts-mode.el.gz.

Signature

(ruby-ts--align-chain N PARENT &rest _)

Documentation

Align chained method call.

Align NODE which will be the dot (.) to the dot of the first (outermost) call in the chain. See ruby-align-chained-calls for details. PARENT will be the
"call" node. Called only when ruby-align-chained-calls is
non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-ts-mode.el.gz
(defun ruby-ts--align-chain (_n parent &rest _)
  "Align chained method call.
Align NODE which will be the dot (.) to the dot of the
first (outermost) call in the chain.  See
`ruby-align-chained-calls' for details.  PARENT will be the
\"call\" node.  Called only when `ruby-align-chained-calls' is
non-nil."
  (let* (first-call )
    (while (and parent
                (setq first-call (treesit-node-parent parent))
                (equal "call" (treesit-node-type first-call)))
      (setq parent first-call))
    (treesit-node-start (treesit-search-subtree parent "\\." nil t))))