@@ -828,16 +828,16 @@ 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.
834- ( let ((treesit-language-source-alist clojure-ts- grammar-recipes) )
835- ( unless ( treesit-language-available-p 'clojure nil )
836- ( message " Installing clojure tree-sitter grammar. " )
837- ( treesit-install-language-grammar 'clojure ))
838- ( unless (treesit-language-available-p 'markdown_inline nil )
839- ( message " Installing markdown tree-sitter grammar. " )
840- (treesit-install-language-grammar 'markdown_inline )))))
831+ ( dolist (recipe clojure-ts-grammar-recipes)
832+ ( let ((grammar ( car recipe)))
833+ ( unless (treesit-language-available-p grammar nil )
834+ ( message " Installing %s tree-sitter grammar" grammar )
835+ ; ; ` treesit-language-source-alist' is dynamically scoped.
836+ ; ; Binding it in this let expression allows
837+ ; ; ` treesit-install-language-gramamr' to pick up the grammar recipes
838+ ; ; without modifying what the user has configured themselves.
839+ ( let ((treesit-language-source-alist clojure-ts- grammar-recipes) )
840+ (treesit-install-language-grammar grammar)) )))))
841841
842842(defun clojure-ts-mode-variables (&optional markdown-available )
843843 " Set up initial buffer-local variables for clojure-ts-mode.
0 commit comments