Skip to content

Commit 01e6a0b

Browse files
rrudakovbbatsov
authored andcommitted
Set clojure-ts-completion-at-point-function locally
We should use add-hook instead of add-to-list in order to set it only for clojure-ts-mode buffers.
1 parent 569ed6c commit 01e6a0b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## main (unreleased)
44

55
- [#109](https://github.com/clojure-emacs/clojure-ts-mode/issues/109): Improve performance by pre-compiling Tree-sitter queries.
6+
- [#111](https://github.com/clojure-emacs/clojure-ts-mode/pull/111): Set `clojure-ts-completion-at-point-function` only for `clojure-ts-mode`
7+
buffers.
68

79
## 0.5.0 (2025-06-04)
810

@@ -21,7 +23,8 @@
2123
allows highlighting JS syntax in ClojureScript `js*` forms.
2224
- [#104](https://github.com/clojure-emacs/clojure-ts-mode/pull/104): Introduce the `clojure-ts-extra-def-forms` customization option to specify
2325
additional `defn`-like forms that should be fontified.
24-
- Introduce completion feature and `clojure-ts-completion-enabled` customization.
26+
- [#108](https://github.com/clojure-emacs/clojure-ts-mode/pull/108): Introduce completion feature and `clojure-ts-completion-enabled`
27+
customization.
2528

2629
## 0.4.0 (2025-05-15)
2730

clojure-ts-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2858,7 +2858,8 @@ REGEX-AVAILABLE."
28582858
(setq-local treesit-thing-settings clojure-ts--thing-settings))
28592859

28602860
(when clojure-ts-completion-enabled
2861-
(add-to-list 'completion-at-point-functions #'clojure-ts-completion-at-point-function)))
2861+
(add-hook 'completion-at-point-functions
2862+
#'clojure-ts-completion-at-point-function nil 'local)))
28622863

28632864
;;;###autoload
28642865
(define-derived-mode clojure-ts-mode prog-mode "Clojure[TS]"

0 commit comments

Comments
 (0)