Skip to content

Commit 61fc513

Browse files
committed
clojure-ts--ensure-grammars: Add comment about use of dynamic scope
1 parent 58f3c83 commit 61fc513

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clojure-ts-mode.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,9 @@ forms like deftype, defrecord, reify, proxy, etc."
828828
(defun clojure-ts--ensure-grammars ()
829829
"Install required language grammars if not already available."
830830
(when clojure-ts-ensure-grammars
831+
;; `treesit-language-source-alist' is dynamically scoped.
832+
;; Setting it here allows `treesit-install-language-gramamr' to pick up
833+
;; the grammar recipes we want without modifying what the user has set.
831834
(let ((treesit-language-source-alist clojure-ts-grammar-recipes))
832835
(unless (treesit-language-available-p 'clojure nil)
833836
(message "Installing clojure tree-sitter grammar.")

0 commit comments

Comments
 (0)