Skip to content

Commit fd0477f

Browse files
committed
fix(treesit-auto): mark only non-installed grammar for install
1 parent 483224c commit fd0477f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/me-prog.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
:url "https://github.com/nix-community/tree-sitter-nix"
2929
:ext "\\.nix\\'")
3030
treesit-auto-recipe-list)
31-
(setq treesit-auto-langs (seq-map #'treesit-auto-recipe-lang treesit-auto-recipe-list)))
31+
;; Setup `treesit-auto-langs' to include only the languages with non-installed
32+
;; grammars from all supported languages.
33+
(let ((langs (mapcar #'treesit-auto-recipe-lang treesit-auto-recipe-list)))
34+
(setq treesit-auto-langs (seq-difference (seq-filter #'treesit-language-available-p langs) langs))))
3235

3336
(use-package awk-ts-mode
3437
:straight t

0 commit comments

Comments
 (0)