From 3a74967ee3c126416cbd62a00db43bccbd14c45b Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 3 May 2024 21:39:54 -0400 Subject: [PATCH] Use yaml-ts-mode and yaml-pro-mode instead of yaml-language-server --- emacs/.emacs.d/config/init-ide.el | 1 - emacs/.emacs.d/config/init-yaml.el | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index 0cc2226..889b56d 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -235,7 +235,6 @@ (ruby-ts-mode . eglot-ensure) (sh-mode . eglot-ensure) (bash-ts-mode . eglot-ensure) - (yaml-mode . eglot-ensure) (astro-ts-mode . eglot-ensure) :custom (eglot-confirm-server-initiated-edits nil) diff --git a/emacs/.emacs.d/config/init-yaml.el b/emacs/.emacs.d/config/init-yaml.el index e169577..a7d8ebf 100644 --- a/emacs/.emacs.d/config/init-yaml.el +++ b/emacs/.emacs.d/config/init-yaml.el @@ -1,9 +1,13 @@ ;; -*- lexical-binding: t; -*- ;; YAML - literally the worst but still holds an important place in my life -(use-package yaml-mode +(use-package yaml-ts-mode :mode ("\\.yaml\\'" "\\.yml\\'") :config - (add-hook 'yaml-mode-hook #'highlight-indent-guides-mode)) + (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)) (provide 'init-yaml)