From 0e849f058cc959a8fa4cd521d6d62f708d77ce55 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 3 Sep 2023 12:31:52 +0200 Subject: emacs: Add ‘mango-treesit-install’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/emacs/config.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.config/emacs') diff --git a/.config/emacs/config.org b/.config/emacs/config.org index dc7e06e..ef99206 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -772,6 +772,14 @@ already installed unfortunately, but it’s easy enough to do manually. (toml "https://github.com/tree-sitter/tree-sitter-toml") (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) + (defun mango-treesit-install () + "Install all the tree-sitter grammars in ‘treesit-language-source-alist’. + This function does not assert whether 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)))) + ;; Automatically install missing grammars (thread-last (mapcar #'car treesit-language-source-alist) -- cgit v1.2.3