From 7edc8134f998cf6859a58a853515cc37d589a2c3 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 16 Aug 2023 00:11:10 +0200 Subject: emacs: Add YAML tree-sitter support --- .config/emacs/config.org | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '.config/emacs') diff --git a/.config/emacs/config.org b/.config/emacs/config.org index cd499a7..5feb39c 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -663,7 +663,8 @@ already installed unfortunately, but it’s easy enough to do manually. (make "https://github.com/alemuller/tree-sitter-make") (markdown "https://github.com/ikatyang/tree-sitter-markdown") (python "https://github.com/tree-sitter/tree-sitter-python") - (toml "https://github.com/tree-sitter/tree-sitter-toml"))) + (toml "https://github.com/tree-sitter/tree-sitter-toml") + (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) ;; Automatically install missing grammars (thread-last @@ -1026,7 +1027,11 @@ file with a certain file extension. #+BEGIN_SRC elisp (require 'rust-ts-mode) - (add-to-list 'auto-mode-alist '("\\.rsl\\'" . rust-ts-mode)) + (require 'yaml-ts-mode) + + (mm-for-each `((,(rx ".rs" eos) . rust-ts-mode) + (,(rx (or ".yml" ".yaml")) . yaml-ts-mode)) + (add-to-list 'auto-mode-alist x)) #+END_SRC -- cgit v1.2.3