lang/php: update wrt changes upstream #1350

Removes some of the hacks that have long since been resolved upstream,
and install phpactor from MELPA, now that it is available there.
This commit is contained in:
Henrik Lissner 2019-04-24 20:58:06 -04:00
parent fc511ed701
commit 4506fb9223
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 1 additions and 17 deletions

View file

@ -40,22 +40,6 @@
(set-lookup-handlers! 'php-mode
:definition #'phpactor-goto-definition)
;; TODO PR these for phpactor.el?
;; company-phpactor breaks company if executable doesn't exist
(defun +php*company-phpactor-fail-silently (orig-fn &rest args)
(when (phpactor-find-executable)
(apply orig-fn args)))
(advice-add #'company-phpactor :around #'+php*company-phpactor-fail-silently)
;; `phpactor-get-working-dir' throws stringp errors if not in a project.
(defun +php*project-root (&rest _)
(setq phpactor-working-dir
(or phpactor-working-dir
(php-project-get-root-dir)
(doom-project-root)
default-directory)))
(advice-add #'phpactor-get-working-dir :before #'+php*project-root)
(map! :localleader
:map php-mode-map
:prefix "r"

View file

@ -11,7 +11,7 @@
(package! hack-mode :recipe (:fetcher github :repo "hhvm/hack-mode")))
(unless (featurep! +lsp)
(package! phpactor :recipe (:fetcher github :repo "emacs-php/phpactor.el" :files ("*"))))
(package! phpactor))
(when (featurep! :editor format)
(package! php-cs-fixer))