all repos — nixfiles @ fbd4633b01cfd64590ecb339f18f3b4ac59c4ddf

System and user configuration, managed by nix and home-manager

Emacs: Create mode for Salt to use with helm-dash
Alan Pearce alan@alanpearce.co.uk
Fri, 08 Aug 2014 11:38:27 +0100
commit

fbd4633b01cfd64590ecb339f18f3b4ac59c4ddf

parent

04fc37a53277730a68b8f3af7c8597ae9c1e6ab8

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -336,7 +336,8 @@ (when (require 'helm-dash nil :noerror)                   (setq-local helm-dash-docsets (if (listp docsets) docsets (list docsets))))))
             (add-hook 'ansible-mode-hook (ap/create-helm-dash-hook "Ansible"))
             (add-hook 'php-mode-hook (ap/create-helm-dash-hook '("PHP" "Symfony")))
-            (add-hook 'twig-mode-hook (ap/create-helm-dash-hook '("Twig")))))
+            (add-hook 'twig-mode-hook (ap/create-helm-dash-hook '("Twig")))
+            (add-hook 'saltstack-mode-hook (ap/create-helm-dash-hook '("SaltStack")))))
 
 (req-package which-func
   :init (which-function-mode)
@@ -693,6 +694,9 @@ ("\\.sls\\'" . yaml-mode))) 
 (define-derived-mode ansible-mode yaml-mode "Ansible")
 (add-to-list 'auto-mode-alist '("\\(?:ansible.+\\|roles/.+/\\(?:tasks\\|handlers\\)\\)/.+\\.yml\\'" . ansible-mode))
+
+(define-derived-mode saltstack-mode yaml-mode "Salt")
+(add-to-list 'auto-mode-alist '("\\.sls\\'" . saltstack-mode))
 
 ;;;; Planning