Skip to content

Commit 623c982

Browse files
committed
Disable treesit-transpose-sexps on Emacs 30
The treesit-implementation chokes on keywords and symbols. This is probably because keywords and symbols have named child nodes that the transpose algorithm picks up. The default implementation works better so we can use that for now. See issue #17
1 parent d630cd6 commit 623c982

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## main (unreleased)
44

5+
- Disable treesit-transpose-sexps on Emacs 30 in favor of the default implementation (#17)
56
- Implement clojure-ts-find-ns function (mostly as a demonstration).
67

78
## 0.1.4

clojure-ts-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,9 @@ See `clojure-ts--standard-definition-node-name' for the implementation used.")
623623
(setq-local treesit--indent-verbose t
624624
treesit--font-lock-verbose t)
625625
(treesit-inspect-mode))
626-
(treesit-major-mode-setup)))
627-
626+
(treesit-major-mode-setup)
627+
(when (fboundp 'transpose-sexps-default-function)
628+
(setq-local transpose-sexps-function #'transpose-sexps-default-function))))
628629

629630
;;;###autoload
630631
(define-derived-mode clojurescript-ts-mode clojure-ts-mode "ClojureScript[TS]"

0 commit comments

Comments
 (0)