doomemacs/modules/module-php.el

33 lines
1.0 KiB
EmacsLisp
Raw Normal View History

2015-06-15 15:06:10 +08:00
;;; module-php.el
(use-package php-mode
:mode "\\.\\(php\\|inc\\)$"
:init
(add-hook! php-mode 'flycheck-mode)
(setq php-template-compatibility nil
php-extras-eldoc-functions-file (concat narf-temp-dir "php-extras-eldoc-functions"))
2015-11-17 15:09:34 +08:00
2015-06-15 15:06:10 +08:00
:config
(require 'php-extras)
2015-10-14 15:39:32 +08:00
(define-company-backend! php-mode '(php-extras-company))
2015-06-15 15:06:10 +08:00
2015-11-17 15:09:34 +08:00
(unless (file-exists-p (concat php-extras-eldoc-functions-file ".el"))
(async-start `(lambda ()
,(async-inject-variables "\\`\\(load-path\\|php-extras-eldoc-functions-file\\)$")
(require 'php-extras-gen-eldoc)
(php-extras-generate-eldoc-1 t))
(lambda (_)
(load (concat php-extras-eldoc-functions-file ".el"))
(message "PHP eldoc updated!"))))
2015-06-15 15:06:10 +08:00
;; TODO Tie into emr
(require 'php-refactor-mode)
(add-hook! php-mode '(turn-on-eldoc-mode emr-initialize php-refactor-mode)))
2015-11-25 19:00:49 +08:00
(use-package php-boris :defer t)
2015-10-10 06:00:39 +08:00
(use-package hack-mode :mode "\\.hh$")
2015-06-15 15:06:10 +08:00
(provide 'module-php)
;;; module-php.el ends here