doomemacs/modules/tools/ansible/config.el
Henrik Lissner 0a84d2f0a9
core-lib: add auto-minor-mode, revise def-project-mode!
- Adds the auto-minor-mode package to replace our in-house
  implementation.
- Merges associate! into the def-project-mode! macro because associate!
  on its own is less useful than auto-minor-mode-alist,
  auto-minor-mode-magic-alist or hooks.
- Changes the semantics of :modes and :add-hooks properties of
  def-project-mode!. Its arguments are evaluated as is; lists will need
  to be quoted.

squash! core-lib: remove associate! macro
2019-07-22 02:30:39 +02:00

25 lines
847 B
EmacsLisp

;;; tools/ansible/config.el -*- lexical-binding: t; -*-
(def-package! ansible
:commands ansible-auto-decrypt-encrypt
:init
(put 'ansible-vault-password-file 'safe-local-variable #'stringp)
:config
(setq ansible-section-face 'font-lock-variable-name-face
ansible-task-label-face 'font-lock-doc-face)
(map! :map ansible-key-map
:localleader
:desc "Decrypt buffer" "d" #'ansible-decrypt-buffer
:desc "Encrypt buffer" "e" #'ansible-encrypt-buffer
:desc "Look up in Ansible docs" "h" #'ansible-doc))
(after! ansible-doc
(set-evil-initial-state! '(ansible-doc-module-mode) 'emacs))
(def-package! jinja2-mode
:mode "\\.j2$")
(def-project-mode! +ansible-yaml-mode
:modes '(yaml-mode)
:add-hooks '(ansible ansible-auto-decrypt-encrypt ansible-doc-mode)
:files ("roles/"))