mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -40,22 +40,6 @@
|
|||||||
(set-lookup-handlers! 'php-mode
|
(set-lookup-handlers! 'php-mode
|
||||||
:definition #'phpactor-goto-definition)
|
: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! :localleader
|
||||||
:map php-mode-map
|
:map php-mode-map
|
||||||
:prefix "r"
|
:prefix "r"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
(package! hack-mode :recipe (:fetcher github :repo "hhvm/hack-mode")))
|
(package! hack-mode :recipe (:fetcher github :repo "hhvm/hack-mode")))
|
||||||
|
|
||||||
(unless (featurep! +lsp)
|
(unless (featurep! +lsp)
|
||||||
(package! phpactor :recipe (:fetcher github :repo "emacs-php/phpactor.el" :files ("*"))))
|
(package! phpactor))
|
||||||
|
|
||||||
(when (featurep! :editor format)
|
(when (featurep! :editor format)
|
||||||
(package! php-cs-fixer))
|
(package! php-cs-fixer))
|
||||||
|
Reference in New Issue
Block a user