dotfiles/emacs/.emacs.d/config/init-yaml.el

22 lines
881 B
EmacsLisp

;; -*- lexical-binding: t; -*-
;; YAML - literally the worst but still holds an important place in my life
(use-package yaml-ts-mode
:mode ("\\.yaml\\'" "\\.yml\\'")
:config
(add-hook 'yaml-ts-mode-hook #'highlight-indent-guides-mode))
(use-package yaml-pro
:when (treesit-ready-p 'yaml)
:hook (yaml-ts-mode . yaml-pro-ts-mode)
:general
(yaml-pro-ts-mode-map [remap evil-backward-section-begin] #'yaml-pro-ts-prev-subtree
[remap evil-forward-section-begin] #'yaml-pro-ts-next-subtree
[remap evil-shift-right] #'yaml-pro-ts-indent-subtree
[remap evil-shift-left] #'yaml-pro-ts-unindent-subtree
"C-c j" #'yaml-pro-ts-move-subtree-down
"C-c k" #'yaml-pro-ts-move-subtree-up
"C-c f" #'yaml-pro-format))
(provide 'init-yaml)