summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-16 00:11:10 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-08-16 00:11:10 +0200
commit7edc8134f998cf6859a58a853515cc37d589a2c3 (patch)
tree861737a8b76387fee87096c673ca8f8aff723bd6 /.config/emacs
parent0a3cc8f53c65cffebf75f2105a7a88ae6d181654 (diff)
emacs: Add YAML tree-sitter support
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/config.org9
1 files changed, 7 insertions, 2 deletions
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