2015-02-03 20:22:48 +00:00
|
|
|
;;; packages.el --- PHP Layer packages File for Spacemacs
|
|
|
|
;;
|
2017-01-06 03:51:13 +00:00
|
|
|
;; Copyright (c) 2012-2017 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
|
|
|
|
'(
|
|
|
|
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
|
2017-05-26 08:40:06 +00:00
|
|
|
(company-php :toggle (configuration-layer/package-usedp 'company))
|
2015-08-13 03:56:43 +00:00
|
|
|
))
|
|
|
|
|
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 ()
|
2016-04-05 04:08:34 +00:00
|
|
|
(add-hook 'php-mode-hook 'eldoc-mode))
|
2015-04-22 04:34:55 +00:00
|
|
|
|
2015-09-10 02:30:12 +00:00
|
|
|
(defun php/post-init-flycheck ()
|
2017-02-14 03:27:29 +00:00
|
|
|
(spacemacs/enable-flycheck 'php-mode))
|
2015-09-10 02:30:12 +00:00
|
|
|
|
2015-04-22 04:34:55 +00:00
|
|
|
(defun php/post-init-ggtags ()
|
2016-08-15 19:24:44 +00:00
|
|
|
(add-hook 'php-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
2015-04-22 04:34:55 +00:00
|
|
|
|
2016-05-30 02:39:21 +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))
|
2017-05-24 05:18:41 +00:00
|
|
|
|
2017-05-26 08:40:06 +00:00
|
|
|
(defun php/init-company-php ()
|
2017-05-24 05:18:41 +00:00
|
|
|
(use-package company-php
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(progn
|
2017-05-26 08:40:06 +00:00
|
|
|
(push 'ac-php-find-symbol-at-point spacemacs-jump-handlers-php-mode)
|
|
|
|
(add-hook 'php-mode-hook 'ac-php-core-eldoc-setup)
|
|
|
|
(spacemacs|add-company-backends
|
|
|
|
:modes php-mode
|
|
|
|
:variables
|
|
|
|
company-minimum-prefix-length 1000
|
|
|
|
:backends company-ac-php-backend))))
|