Skip to content

Commit 026b65d

Browse files
committed
Refactor using clojure-ts--node-child-skip-meta
1 parent 702af2e commit 026b65d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: clojure-ts-mode.el

+3-6
Original file line numberDiff line numberDiff line change
@@ -742,20 +742,17 @@ PARENT is expected to be a list literal.
742742
See `treesit-simple-indent-rules'."
743743
(and
744744
(clojure-ts--list-node-p parent)
745-
(let* ((first-child (treesit-node-child parent 0 t))
746-
(non-meta-first-child (if (clojure-ts--meta-node-p first-child)
747-
(treesit-node-child parent 1 t)
748-
first-child)))
745+
(let* ((first-child (clojure-ts--node-child-skip-meta parent 0)))
749746
(and
750747
(not
751748
(clojure-ts--symbol-matches-p
752749
;; Symbols starting with this are false positives
753750
(rx line-start (or "default" "deflate" "defer"))
754-
non-meta-first-child))
751+
first-child))
755752
(not (clojure-ts--match-with-meta node parent _bol))
756753
(clojure-ts--symbol-matches-p
757754
clojure-ts--symbols-with-body-expressions-regexp
758-
non-meta-first-child)))))
755+
first-child)))))
759756

760757
(defun clojure-ts--match-method-body (_node parent _bol)
761758
"Matches a `NODE' in the body of a `PARENT' method implementation.

0 commit comments

Comments
 (0)