summaryrefslogtreecommitdiffstats
path: root/lisp/init-yaml-mode.el
blob: 69210556f27164b4e4df8ffbc2e400d6925fff74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;; install package
(require-package 'yaml-mode)

;; load yaml-mode
(require 'yaml-mode)

;; don't override C-j
(eval-after-load "yaml-mode"
  '(define-key yaml-mode-map (kbd "C-j") nil))

;; disable electric indent
(add-hook 'yaml-mode-hook
          (lambda () (setq-local electric-indent-mode nil)))

;; ansible group_vars and host_vars
(add-to-list 'auto-mode-alist '("/\\(group\\|host\\)_vars/" . yaml-mode))

;; salt state files
(add-to-list 'auto-mode-alist '("\\.sls\\'" . yaml-mode))

(provide 'init-yaml-mode)