aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
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
parent3ad4f10ac4ad1557cf174388224e9c1333065e84 (diff)
downloadnew-dotfiles-22e8fdafa05ad43bd90b96407d515f798ee20aad.tar.gz
new-dotfiles-22e8fdafa05ad43bd90b96407d515f798ee20aad.zip
Add php-mode hydra
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el2
-rw-r--r--emacs/.emacs.d/init/oni-php-mode-init.el10
2 files changed, 10 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index c6a57d7..8ff8b47 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -82,7 +82,7 @@
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
(global-set-key (kbd "C-c (") 'embrace-commander)
(global-set-key (kbd "C-c o") 'oni-hydra-org/body)
-(global-set-key (kbd "C-c m") 'oni-hydra-magit/body)
+(global-set-key (kbd "C-c v") 'oni-hydra-magit/body)
(global-set-key (kbd "C-x f") 'ffap)
(require 'destroy-trailing-whitespace)
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