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 35668ce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 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,9 @@
(use-package tree-sitter-langs
:defines (tree-sitter-langs--testing)
:init
(setq tree-sitter-langs--testing (getenv "ci_tests")))
(setq tree-sitter-langs--testing (or (and (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 35668ce

Please sign in to comment.