opencode
opencode copied to clipboard
feat(lsp): add phpactor lsp support for php
Hello!
This adds support for the phpactor lsp for php files. phpactor has several benefits over the intelephense lsp that is currently included for php:
- 100% free (does not require a license key, unlike intelephense)
- open source
- active maintainer that is responsive to issues and bug reports
- interfaces with phpstan and other php tools
[!NOTE] Currently both the intelephense and phpactor lsp servers would be started for php files, there's a couple of paths forward depending on how y'all would like to handle this:
- do nothing, it probably won't hurt to have both lsps running and users could simply disable the one they don't want
- add some heuristics to determine which one should run (e.g., run intelephense if the user has the license file)
- make one the default (e.g., phpactor since it's free) that autodownloads, the other would not autodownload, but could be used if the user installs the binary manually and disables the default
- remove the autodownload from both, this would allow the user to determine which one is installed and used
Just let me know how y'all would like to proceed.
Thanks!