diff options
| author | Ruslan Kamashev <rynffoll@gmail.com> | 2025-09-28 19:22:23 +0400 |
|---|---|---|
| committer | Youmu <condy0919@gmail.com> | 2025-10-16 02:35:42 +0800 |
| commit | 44f3de67af4a4ea5c7213c1de1001af0a84e723e (patch) | |
| tree | 97c5e6ba29b0256826b2acd786f1063281d3d908 | |
| parent | 646d7d64bb88944f941ca45405cb4aaff0c41d25 (diff) | |
Fix evil-shift-width for yaml-ts-mode
| -rw-r--r-- | evil-collection.el | 2 | ||||
| -rw-r--r-- | modes/yaml-mode/evil-collection-yaml-mode.el | 4 |
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 |
