Skip to content

Commit

Permalink
Add imenu support for deftest
Browse files Browse the repository at this point in the history
  • Loading branch information
rrudakov authored and bbatsov committed Jul 25, 2024
1 parent eb9aab3 commit 0e6816e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [#38]: Add support for `in-ns` forms in `clojure-ts-find-ns`.
- [#46]: Fix missing `comment-add` variable in `clojure-ts-mode-variables` mentioned in [#26]
- Add imenu support for `deftest` definitions.

## 0.2.2 (2024-02-16)

Expand Down
2 changes: 1 addition & 1 deletion clojure-ts-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ Can be called directly, but intended for use as `treesit-defun-name-function'."
(treesit-node-text name)))))))

(defvar clojure-ts--function-type-regexp
(rx string-start (or (seq "defn" (opt "-")) "defmethod") string-end)
(rx string-start (or (seq "defn" (opt "-")) "defmethod" "deftest") string-end)
"Regular expression for matching definition nodes that resemble functions.")

(defun clojure-ts--function-node-p (node)
Expand Down

0 comments on commit 0e6816e

Please sign in to comment.