Files
.emacs.d/modules/languages/siren-yaml.el
Jim Myhrberg 290ba13b1c chore: Improve loading of prog-mode features into non-prog-mode modes
There are a few major modes which are not based on prog-mode, that I
want to behave like prog-mode. Previously each did nearly all the same
setup that's done via the prog-mode hooks. Now instead let's actually
run runs the hooks for prog-mode.
2020-01-26 20:25:49 +00:00

31 lines
570 B
EmacsLisp

;;; siren-yaml.el --- jimeh's Emacs Siren: yaml-mode configuration.
;;; Commentary:
;; Basic configuration for yaml-mode.
;;; Code:
(require 'siren-prog-mode)
(use-package yaml-mode
:mode "\\.yml\\'" "\\.yaml\\'"
:bind (:map yaml-mode-map
("RET" . newline-and-indent))
:hook
(yaml-mode . siren-yaml-mode-setup)
:init
(defun siren-yaml-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(subword-mode +1)))
(use-package yaml-imenu
:config
(yaml-imenu-enable))
(provide 'siren-yaml)
;;; siren-yaml.el ends here