summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-10 22:42:53 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-10 22:42:53 +0200
commitdf345d960f99ca728fb16bc5d9fd5e4b7449d025 (patch)
treef9d47001fc1869b891569a5504b34bf3e4cf0de8 /.config/emacs/init.el
parent6f0677fc2f9f56c3dbe046c90eee947cc01bfd3a (diff)
emacs: Get tree-sitter grammars asyncronously
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el9
1 files changed, 7 insertions, 2 deletions
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)