Add php-mode hydra

This commit is contained in:
Tom Willemse 2018-07-09 19:39:11 -07:00
parent 3ad4f10ac4
commit 22e8fdafa0
2 changed files with 10 additions and 2 deletions

View file

@ -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)

View file

@ -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