refactor!(php): remove phpactor.el
BREAKING CHANGE: This removes the phpactor.el package in favor of LSP support via lsp-mode/eglot. Use `+lsp` with the `:lang php` module instead (with one of the supported LSP servers). This was done because phpactor.el is on the way out of maintainership, is redundant with pre-existing phpactor support in lsp-mode/eglot (or the other, possibly superior LSP servers), and to simplify modules for whom LSP/Eglot is *the* way to get these features.
This commit is contained in:
parent
b69e7d1780
commit
fbfed24167
3 changed files with 6 additions and 32 deletions
|
@ -12,6 +12,7 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs.
|
|||
- Code refactoring commands (~php-refactor-mode~)
|
||||
- Unit-test commands (~phpunit~)
|
||||
- Support for ~laravel~ and ~composer~ projects (with project-specific snippets)
|
||||
- LSP support (via the [[doom-module:+lsp]] flag)
|
||||
- [[../../editor/file-templates/templates/php-mode][File templates]]
|
||||
- [[https://github.com/hlissner/doom-snippets/tree/master/php-mode][Snippets]]
|
||||
|
||||
|
@ -31,8 +32,8 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs.
|
|||
- +hack ::
|
||||
Add support for the [[https://hacklang.org/][Hack dialect of PHP]] by Facebook.
|
||||
- +lsp ::
|
||||
Enable LSP support for ~php-mode~. Requires [[doom-module::tools lsp]] and a langserver
|
||||
(supports [[https://phpactor.readthedocs.io/en/develop/usage/standalone.html][phpactor]] and intelephense).
|
||||
Enable LSP support for ~php-mode~. Requires [[doom-module::tools lsp]] and a
|
||||
langserver (supports [[https://emacs-lsp.github.io/lsp-mode/page/lsp-phpactor/][phpactor]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-intelephense/][intelephense]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-serenata/][serenata]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-php/][php-language-server]]).
|
||||
- +tree-sitter ::
|
||||
Leverages tree-sitter for better syntax highlighting and structural text
|
||||
editing. Requires [[doom-module::tools tree-sitter]].
|
||||
|
@ -45,9 +46,6 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs.
|
|||
- [[doom-package:php-mode]]
|
||||
- [[doom-package:php-refactor-mode]]
|
||||
- [[doom-package:phpunit]]
|
||||
- if [[doom-module:+lsp]]
|
||||
- [[doom-package:phpactor]]
|
||||
- [[doom-package:company-phpactor]]
|
||||
|
||||
** Hacks
|
||||
/No hacks documented for this module./
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
:yield "use")
|
||||
|
||||
(if (not (modulep! +lsp))
|
||||
;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or
|
||||
;; `+php-company-backend' uses `php-extras-company' or
|
||||
;; `company-dabbrev-code', in that order.
|
||||
(when +php--company-backends
|
||||
(set-company-backend! 'php-mode
|
||||
|
@ -78,24 +78,6 @@
|
|||
"s" #'phpunit-current-test))
|
||||
|
||||
|
||||
(use-package! phpactor
|
||||
:unless (modulep! +lsp)
|
||||
:after php-mode
|
||||
:init
|
||||
(add-to-list '+php--company-backends #'company-phpactor nil 'eq)
|
||||
:config
|
||||
(set-lookup-handlers! 'php-mode
|
||||
:definition #'phpactor-goto-definition)
|
||||
(map! :localleader
|
||||
:map php-mode-map
|
||||
:prefix ("r" . "refactor")
|
||||
"cc" #'phpactor-copy-class
|
||||
"mc" #'phpactor-move-class
|
||||
"oi" #'phpactor-offset-info
|
||||
"t" #'phpactor-transform
|
||||
"ic" #'phpactor-import-class))
|
||||
|
||||
|
||||
(use-package! php-refactor-mode
|
||||
:hook php-mode
|
||||
:config
|
||||
|
@ -111,13 +93,12 @@
|
|||
(use-package! php-extras
|
||||
:after php-mode
|
||||
:preface
|
||||
(setq php-extras-eldoc-functions-file
|
||||
(concat doom-profile-cache-dir "php-extras-eldoc-functions"))
|
||||
;; We'll set up company support ourselves
|
||||
(advice-add #'php-extras-company-setup :override #'ignore)
|
||||
:init
|
||||
(add-to-list '+php--company-backends #'php-extras-company)
|
||||
:config
|
||||
(setq php-extras-eldoc-functions-file
|
||||
(concat doom-data-dir "php-extras-eldoc-functions"))
|
||||
;; Silence warning if `php-extras-eldoc-functions-file' hasn't finished
|
||||
;; generating yet.
|
||||
(defun php-extras-load-eldoc ()
|
||||
|
|
|
@ -15,10 +15,5 @@
|
|||
:recipe (:host github :repo "hhvm/hack-mode")
|
||||
:pin "ccf20511f0f2ed45d00d423c703bb91ab6a8b80c"))
|
||||
|
||||
(unless (modulep! +lsp)
|
||||
(package! phpactor :pin "6b5269ff82785a9bd1e648b2f91e5128353d5a67")
|
||||
(when (modulep! :completion company)
|
||||
(package! company-phpactor :pin "6b5269ff82785a9bd1e648b2f91e5128353d5a67")))
|
||||
|
||||
;; For building php-extras
|
||||
(package! async :pin "cff2bd0be3c78a2eb76717eed60302972fe9b8c5")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue