diff --git a/init.el b/init.el index 593505f..d37b111 100644 --- a/init.el +++ b/init.el @@ -118,6 +118,7 @@ (python "https://github.com/tree-sitter/tree-sitter-python") (rust "https://github.com/tree-sitter/tree-sitter-rust") (json "https://github.com/tree-sitter/tree-sitter-json") + (yaml "https://github.com/ikatyang/tree-sitter-yaml") (css "https://github.com/tree-sitter/tree-sitter-css") (go "https://github.com/tree-sitter/tree-sitter-go") (js "https://github.com/tree-sitter/tree-sitter-javascript") @@ -133,6 +134,7 @@ (java-mode . java-ts-mode) (rust-mode . rust-ts-mode) (json-mode . json-ts-mode) + (yaml-mode . yaml-ts-mode) (css-mode . css-ts-mode) (js-mode . js-ts-mode) (cmake-mode . cmake-ts-mode)))) @@ -680,12 +682,20 @@ COMMAND and COMINT are like `compile'." (add-hook 'cmake-ts-mode-hook #'eglot-ensure)) ;; json +(use-package json-ts-mode + :hook (json-ts-mode . eglot-ensure)) (use-package json-mode) ;; firejail (require 'firejail-mode) ;; yaml +(use-package yaml-ts-mode + :hook ((yaml-ts-mode . eglot-ensure) + (yaml-ts-mode . my/-setup-yaml-ts-mode)) + :init + (defun my/-setup-yaml-ts-mode () + (setq indent-line-function #'yaml-indent-line))) (use-package yaml-mode) ;; yuck (config language for eww)