summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evil-collection.el2
-rw-r--r--modes/yaml-mode/evil-collection-yaml-mode.el4
2 files changed, 4 insertions, 2 deletions
diff --git a/evil-collection.el b/evil-collection.el
index dc36248..a4fcea1 100644
--- a/evil-collection.el
+++ b/evil-collection.el
@@ -351,7 +351,7 @@ See `evil-collection-init' and `evil-collection--modes-with-delayed-setup'."
woman
xref
xwidget
- yaml-mode
+ (yaml-mode ,@(when (>= emacs-major-version 29) '(yaml-ts-mode)))
youtube-dl
zmusic
(ztree ztree-diff ztree-dir))
diff --git a/modes/yaml-mode/evil-collection-yaml-mode.el b/modes/yaml-mode/evil-collection-yaml-mode.el
index 3bf6667..0ef9d1c 100644
--- a/modes/yaml-mode/evil-collection-yaml-mode.el
+++ b/modes/yaml-mode/evil-collection-yaml-mode.el
@@ -25,6 +25,7 @@
;;; Code:
(require 'evil-collection)
(require 'yaml-mode nil t)
+(require 'yaml-ts-mode nil t)
(defconst evil-collection-yaml-mode-maps nil)
@@ -36,7 +37,8 @@
;;;###autoload
(defun evil-collection-yaml-mode-setup ()
"Set up `evil' bindings for `yaml'."
- (add-hook 'yaml-mode-hook #'evil-collection-yaml-mode-set-evil-shift-width))
+ (dolist (hook '(yaml-mode-hook yaml-ts-mode-hook))
+ (add-hook hook #'evil-collection-yaml-mode-set-evil-shift-width)))
(provide 'evil-collection-yaml-mode)
;;; evil-collection-yaml-mode.el ends here