Skip to content

Commit

Permalink
[try] treesit check for bound variables to prevent auto downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Nov 15, 2024
1 parent 677db8c commit 1235546
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/init-treesit.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
(message "Enabling built-in treesit and external treesit-auto")
(use-package treesit-auto
:after treesit
:demand t
:commands (global-treesit-auto-mode)
:custom
(treesit-auto-install (unless (getenv "ci_tests")
'prompt)
(treesit-auto-install (if (boundp 'treesit-auto-install)
treesit-auto-install
(unless (getenv "ci_tests")
'prompt))
"Disable automatic grammar downloading in CI")
:config
(global-treesit-auto-mode))
Expand Down Expand Up @@ -64,7 +67,10 @@
(use-package tree-sitter-langs
:defines (tree-sitter-langs--testing)
:init
(setq tree-sitter-langs--testing (getenv "ci_tests")))
(eval-and-compile
(setq tree-sitter-langs--testing (or (when (boundp 'tree-sitter-langs--testing)
tree-sitter-langs--testing)
(getenv "ci_tests")))))
(use-package tree-sitter
:diminish
:after (tree-sitter-langs)
Expand Down

0 comments on commit 1235546

Please sign in to comment.