This package is Emacs interface to Phpactor.
NOTICE: This package is in development. Since some functions are running, this is released as an alpha version.
NOTICE: Phpactor is also in development stage.
Requirement: You need to have composer globally installed.
Installation with use-package :
(use-package phpactor :ensuret) (use-package company-phpactor :ensuret) (use-package php-mode ;;:hook ((php-mode . (lambda () (set (make-local-variable'company-backends) '(;; list of backends company-phpactor company-files ))))))After having installed this package, run `phpactor-install-or-update` (this will install a supported version of phpactor inside `.emacs.d/phpactor`).
NOTICE: To ensure the supported version of Phpactor is installed, you might need to run this command again after an upgrade of this package.
Alternatively, you can install Phpactor on your own and customize `phpactor-executable` but please be aware that any change in Phpactor’s rpc protocol can introduce breakages.
(add-hook'php-mode-hook (lambda () (make-local-variable'eldoc-documentation-function) (setq eldoc-documentation-function 'phpactor-hover)))See https://phpactor.github.io/phpactor/configuration.html
You can run “phpactor-status“ while visiting a project file.
If needed, configure the way the project root is detected via .dir-locals.el
“Phpactor Output” buffer might also contain useful informations.