From 1f0e41d7c254085ca4b38cc40774ad5a1ae50dba Mon Sep 17 00:00:00 2001 From: duianto Date: Sat, 21 Sep 2019 22:40:06 +0200 Subject: [PATCH] [php] Add phpunit test key bindings --- CHANGELOG.develop | 5 +++++ layers/+lang/php/packages.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 58836ffa0..e297ba4e5 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -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) diff --git a/layers/+lang/php/packages.el b/layers/+lang/php/packages.el index 5cd17f39a..6d5ceee06 100644 --- a/layers/+lang/php/packages.el +++ b/layers/+lang/php/packages.el @@ -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