(use-package treesit-auto
:straight (:host github :repo "renzmann/treesit-auto")
:after treesit
:demand t
:custom
(treesit-auto-install 'prompt)
:config
(setq ;; Auto install all supported languages
treesit-auto-langs
(cl-loop for recipe in treesit-auto-recipe-list
collect (treesit-auto-recipe-lang recipe)))
(global-treesit-auto-mode 1))
I like to install all the grammars ahead of time, so I call treesit-auto-install-all. However, when invoking it, it keeps saying:
The problem comes from treesit-language-source-alist, which is set to nil globally and only modified locally in treesit-auto--on. This hack fixes the issue:
(setq treesit-language-source-alist (treesit-auto--build-treesit-source-alist))
;; OR THIS ONE
(advice-add
'treesit-auto-install-all :before
(lambda ()
(setq-local treesit-language-source-alist
(treesit-auto--build-treesit-source-alist))))
Hello,
I'm using
treesit-auto
as follows:I like to install all the grammars ahead of time, so I call
treesit-auto-install-all
. However, when invoking it, it keeps saying:The problem comes from
treesit-language-source-alist
, which is set tonil
globally and only modified locally intreesit-auto--on
. This hack fixes the issue: