Skip to content

Commit 1b74e19

Browse files
committed
Enable dynamic indentation for clojure-ts-mode
1 parent de548e3 commit 1b74e19

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [#3789](https://github.com/clojure-emacs/cider/issues/3789): Refactor and simplify exception handling.
2020
- [#3789](https://github.com/clojure-emacs/cider/issues/3796): Completion: disable client-side sorting (defer to backend-provided candidate order).
2121
- [#3797](https://github.com/clojure-emacs/cider/issues/3797): Completion: enable `cider-completion-style` by default (this enables richer completion suggestions where candidates don't have to strictly match the prefix).
22+
- [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic indentation for `clojure-ts-mode`.
2223

2324
## 1.17.1 (2025-02-25)
2425

cider-mode.el

+6-2
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,10 @@ property."
10941094
;; `tooltip' has variable-width by default, which looks terrible.
10951095
(set-face-attribute 'tooltip nil :inherit 'unspecified)
10961096
(when cider-dynamic-indentation
1097-
(setq-local clojure-get-indent-function #'cider--get-symbol-indent))
1097+
(setq-local clojure-get-indent-function #'cider--get-symbol-indent)
1098+
(with-suppressed-warnings ((free-vars clojure-ts-get-indent-function))
1099+
(setq-local clojure-ts-get-indent-function
1100+
#'cider--get-symbol-indent)))
10981101
(setq-local clojure-expected-ns-function #'cider-expected-ns)
10991102
(when cider-use-xref
11001103
(add-hook 'xref-backend-functions #'cider--xref-backend cider-xref-fn-depth 'local))
@@ -1104,7 +1107,8 @@ property."
11041107
(mapc #'kill-local-variable '(next-error-function
11051108
x-gtk-use-system-tooltips
11061109
font-lock-fontify-region-function
1107-
clojure-get-indent-function))
1110+
clojure-get-indent-function
1111+
clojure-ts-get-indent-function))
11081112
(remove-hook 'completion-at-point-functions #'cider-complete-at-point t)
11091113
(when cider-use-xref
11101114
(remove-hook 'xref-backend-functions #'cider--xref-backend 'local))

0 commit comments

Comments
 (0)