Skip to content

Enable dynamic indentation for clojure-ts-mode #3803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [#3789](https://github.com/clojure-emacs/cider/issues/3789): Refactor and simplify exception handling.
- [#3789](https://github.com/clojure-emacs/cider/issues/3796): Completion: disable client-side sorting (defer to backend-provided candidate order).
- [#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).
- [#3803](https://github.com/clojure-emacs/cider/pull/3803): Enable dynamic indentation for `clojure-ts-mode`.

## 1.17.1 (2025-02-25)

Expand Down
8 changes: 6 additions & 2 deletions cider-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,10 @@ property."
;; `tooltip' has variable-width by default, which looks terrible.
(set-face-attribute 'tooltip nil :inherit 'unspecified)
(when cider-dynamic-indentation
(setq-local clojure-get-indent-function #'cider--get-symbol-indent))
(setq-local clojure-get-indent-function #'cider--get-symbol-indent)
(with-suppressed-warnings ((free-vars clojure-ts-get-indent-function))
(setq-local clojure-ts-get-indent-function
#'cider--get-symbol-indent)))
(setq-local clojure-expected-ns-function #'cider-expected-ns)
(when cider-use-xref
(add-hook 'xref-backend-functions #'cider--xref-backend cider-xref-fn-depth 'local))
Expand All @@ -1104,7 +1107,8 @@ property."
(mapc #'kill-local-variable '(next-error-function
x-gtk-use-system-tooltips
font-lock-fontify-region-function
clojure-get-indent-function))
clojure-get-indent-function
clojure-ts-get-indent-function))
(remove-hook 'completion-at-point-functions #'cider-complete-at-point t)
(when cider-use-xref
(remove-hook 'xref-backend-functions #'cider--xref-backend 'local))
Expand Down