init-php.el 662 B

123456789101112131415161718192021222324252627282930313233
  1. ;;; init-php.el --- .Emacs Configuration -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;;
  4. ;;; Code:
  5. (use-package php-refactor-mode
  6. :pin "MELPA"
  7. :after (php-mode)
  8. :mode ("\\.php\\'" . php-mode)
  9. :hook
  10. (php-mode . php-refactor-mode))
  11. (use-package php-mode
  12. :pin "MELPA"
  13. :ensure t)
  14. (use-package company-php
  15. :pin "MELPA"
  16. :ensure t
  17. :config
  18. (defun cfg:php-mode-hook ()
  19. (interactive)
  20. (require 'company-php)
  21. (company-mode t)
  22. (add-to-list 'company-backends 'company-ac-php-backend))
  23. (add-hook 'php-mode-hook 'cfg:php-mode-hook))
  24. (add-hook 'php-mode-hook (lambda () (subword-mode 1)))
  25. (provide 'init-php)
  26. ;;; init-php.el ends here