2015-02-03 20:22:48 +00:00
|
|
|
;;; packages.el --- PHP Layer packages File for Spacemacs
|
|
|
|
;;
|
2016-01-12 02:40:54 +00:00
|
|
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
2015-02-03 20:22:48 +00:00
|
|
|
;;
|
|
|
|
;; 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
|
2015-09-10 02:30:12 +00:00
|
|
|
flycheck
|
2015-08-13 03:56:43 +00:00
|
|
|
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
|
|
|
|
))
|
|
|
|
|
2015-09-10 02:30:12 +00:00
|
|
|
(when (configuration-layer/layer-usedp 'auto-completion)
|
|
|
|
(defun php/post-init-company ()
|
|
|
|
(spacemacs|add-company-hook php-mode)))
|
|
|
|
|
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
|
|
|
|
2015-09-10 02:30:12 +00:00
|
|
|
(defun php/post-init-flycheck ()
|
|
|
|
(add-hook 'php-mode-hook 'flycheck-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
|
|
|
|
2016-05-16 02:24:27 +00:00
|
|
|
(when (configuration-layer/layer-usedp 'helm)
|
2016-01-04 19:35:19 +00:00
|
|
|
(defun php/post-init-helm-gtags ()
|
|
|
|
(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))
|