2015-02-03 20:22:48 +00:00
|
|
|
;;; packages.el --- PHP Layer packages File for Spacemacs
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2014 Sylvain Benner
|
|
|
|
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-08-13 03:56:43 +00:00
|
|
|
(setq php-packages
|
|
|
|
'(
|
|
|
|
company
|
|
|
|
drupal-mode
|
|
|
|
eldoc
|
|
|
|
ggtags
|
|
|
|
helm-gtags
|
|
|
|
php-auto-yasnippets
|
2015-08-14 19:31:22 +00:00
|
|
|
(php-extras :location (recipe :fetcher github :repo "arnested/php-extras"))
|
2015-08-13 03:56:43 +00:00
|
|
|
php-mode
|
|
|
|
phpcbf
|
|
|
|
phpunit
|
|
|
|
flycheck
|
|
|
|
))
|
|
|
|
|
2015-04-22 04:34:55 +00:00
|
|
|
(defun php/init-drupal-mode ()
|
|
|
|
(use-package drupal-mode
|
|
|
|
:defer t))
|
2015-04-20 13:41:23 +00:00
|
|
|
|
2015-04-22 04:34:55 +00:00
|
|
|
(defun php/post-init-eldoc ()
|
2015-04-22 04:53:57 +00:00
|
|
|
(add-hook 'php-mode-hook 'eldoc-mode)
|
|
|
|
(when (configuration-layer/package-usedp 'ggtags)
|
2015-04-22 08:46:43 +00:00
|
|
|
(spacemacs/ggtags-enable-eldoc 'php-mode)))
|
2015-04-22 04:34:55 +00:00
|
|
|
|
|
|
|
(defun php/post-init-ggtags ()
|
2015-04-22 15:45:10 +00:00
|
|
|
(add-hook 'php-mode-hook 'ggtags-mode))
|
2015-04-22 04:34:55 +00:00
|
|
|
|
|
|
|
(defun php/post-init-helm-gtags ()
|
2015-04-22 04:53:57 +00:00
|
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'php-mode))
|
2015-04-22 04:34:55 +00:00
|
|
|
|
|
|
|
(defun php/init-php-auto-yasnippets ()
|
|
|
|
(use-package php-auto-yasnippets
|
|
|
|
:defer t))
|
2015-04-20 13:41:23 +00:00
|
|
|
|
2015-08-13 03:56:43 +00:00
|
|
|
(defun php/init-php-extras ()
|
|
|
|
(use-package php-extras
|
|
|
|
:defer t))
|
|
|
|
|
2015-04-22 04:34:55 +00:00
|
|
|
(defun php/init-php-mode ()
|
|
|
|
(use-package php-mode
|
2015-04-20 13:41:23 +00:00
|
|
|
:defer t
|
2015-04-22 04:34:55 +00:00
|
|
|
:mode ("\\.php\\'" . php-mode)))
|
2015-04-20 13:41:23 +00:00
|
|
|
|
|
|
|
(defun php/init-phpcbf ()
|
|
|
|
(use-package phpcbf
|
|
|
|
:defer t))
|
|
|
|
|
|
|
|
(defun php/init-phpunit ()
|
|
|
|
(use-package phpunit
|
|
|
|
:defer t))
|
|
|
|
|
|
|
|
(when (configuration-layer/layer-usedp 'auto-completion)
|
|
|
|
(defun php/post-init-company ()
|
2015-04-22 04:34:55 +00:00
|
|
|
(spacemacs|add-company-hook php-mode)))
|