From df345d960f99ca728fb16bc5d9fd5e4b7449d025 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 10 Sep 2024 22:42:53 +0200 Subject: emacs: Get tree-sitter grammars asyncronously --- .config/emacs/init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '.config/emacs/init.el') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 8db76b0..df12a7b 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -415,8 +415,13 @@ indentation-width.") or not the grammar is already installed, making it useful for updating existing grammars." (interactive) - (dolist (spec treesit-language-source-alist) - (treesit-install-language-grammar (car spec)))) + (async-start + `(lambda () + ,(async-inject-variables "\\`treesit-language-source-alist\\'") + (dolist (spec treesit-language-source-alist) + (treesit-install-language-grammar (car spec)))) + (lambda (message) + (message "Done syncing Tree-Sitter grammars")))) (thread-last (mapcar #'car treesit-language-source-alist) -- cgit v1.2.3