aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init
diff options
context:
space:
mode:
authorGravatar Tom Willemse2018-07-09 19:39:11 -0700
committerGravatar Tom Willemse2018-07-09 19:39:11 -0700
commit22e8fdafa05ad43bd90b96407d515f798ee20aad (patch)
tree9e72751f2a64ee2dbd030ee818220f54dbd80f00 /emacs/.emacs.d/init
parent3ad4f10ac4ad1557cf174388224e9c1333065e84 (diff)
downloadnew-dotfiles-22e8fdafa05ad43bd90b96407d515f798ee20aad.tar.gz
new-dotfiles-22e8fdafa05ad43bd90b96407d515f798ee20aad.zip
Add php-mode hydra
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r--emacs/.emacs.d/init/oni-php-mode-init.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/oni-php-mode-init.el b/emacs/.emacs.d/init/oni-php-mode-init.el
index bfbed61..16936f4 100644
--- a/emacs/.emacs.d/init/oni-php-mode-init.el
+++ b/emacs/.emacs.d/init/oni-php-mode-init.el
@@ -24,12 +24,18 @@
;;; Code:
-(eval-when-compile (require 'company))
+(require 'php-mode)
+(require 'hydra)
+(eval-when-compile
+ (require 'company))
(defun oni-php-mode-init--set-require-final-newline ()
"Set `require-final-newline' to t."
(setq require-final-newline t))
+(defhydra php-mode-hydra (:color blue)
+ ("a" align-current "Align current selection"))
+
(add-hook 'php-mode-hook 'electric-pair-local-mode)
(add-hook 'php-mode-hook 'electric-indent-local-mode)
(add-hook 'php-mode-hook 'flycheck-mode)
@@ -43,5 +49,7 @@
(with-eval-after-load 'company
(add-to-list 'company-backends 'company-ac-php-backend))
+(define-key php-mode-map (kbd "C-c m") #'php-mode-hydra/body)
+
(provide 'oni-php-mode-init)
;;; oni-php-mode-init.el ends here