Add better yaml support

This commit is contained in:
Alexander Rosenberg 2024-01-09 04:50:59 -08:00
parent 3b5c56138f
commit e03cfe1b73
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

10
init.el
View File

@ -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)