summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 8b64dc6..d2bfab1 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -334,7 +334,9 @@
               (lambda ()
                 (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 '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")))))
 
 (req-package which-func
   :init (which-function-mode)
@@ -1244,7 +1246,6 @@ mouse-1: Display Line and Column Mode Menu"))))))
 
 (req-package web-mode
   :mode (("/views/.*\\.php\\'" . web-mode)
-         ("\\.html\\.twig\\'" . web-mode)
          ("/layouts/.*\\.html" . web-mode)
          ("/templates/.*\\.php\\'" . web-mode))
   :config (setq web-mode-code-indent-offset 4
@@ -1255,6 +1256,9 @@ mouse-1: Display Line and Column Mode Menu"))))))
                 web-mode-comment-style 2
                 web-mode-disable-auto-pairing t))
 
+(define-derived-mode twig-mode web-mode "Twig")
+(add-to-list 'auto-mode-alist '("\\.html\\.twig\\'" . twig-mode))
+
 (req-package mmm-auto
   :config (progn
             (mmm-add-classes