From d6de014751ceb9ec4460cd84a293199348c5e6b7 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Aug 2014 20:03:31 +0100 Subject: Emacs: Configure helm-dash-docsets for PHP & Twig --- tag-emacs/emacs.d/init.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 8b64dc68..d2bfab19 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 -- cgit 1.4.1