[php] Add phpunit test key bindings

This commit is contained in:
duianto 2019-09-21 22:40:06 +02:00 committed by smile13241324
parent 901b1ad6e4
commit 1f0e41d7c2
2 changed files with 14 additions and 1 deletions

View File

@ -2264,6 +2264,11 @@ Other:
=spacemacs/perltidy-format-function= to move the point and window to their
original locations.
**** PHP
- Key bindings:
- Added =phpunit= test key bindings (thanks to duianto):
- ~SPC m t t~ =phpunit-current-test=
- ~SPC m t c~ =phpunit-current-class=
- ~SPC m t p~ =phpunit-current-project=
- Fixes:
- Added company-php (thanks to jim and Eivind Fonn)
- Fixed php-company autocompletion (thanks to Dela Anthonio)

View File

@ -58,7 +58,15 @@
:mode ("\\.php\\'" . php-mode))
:init
(progn
(add-hook 'php-mode-hook 'spacemacs//php-setup-backend)))
(add-hook 'php-mode-hook 'spacemacs//php-setup-backend))
:config
(progn
(spacemacs/declare-prefix-for-mode 'php-mode "mg" "goto")
(spacemacs/declare-prefix-for-mode 'php-mode "mt" "tests")
(spacemacs/set-leader-keys-for-major-mode 'php-mode
"tt" 'phpunit-current-test
"tc" 'phpunit-current-class
"tp" 'phpunit-current-project)))
(defun php/init-phpcbf ()
(use-package phpcbf