Question:
How can I modify my current setup to get the phpactor LSP running properly in Sublime Text 4?
Currently I’m getting env: php: No such file or directory
when I troubleshoot the server.
Setup:
I have phpactor installed in ~/phpactor
and symlinked to /usr/local/bin
. The phpactor
command is available in my $PATH (i.e. I can run commands like phpactor status
from anywhere)
In my LSP.sublime-settings
I have phpactor client defined like this:
"clients": {
"phpactor": {
"enabled": true,
"command": ["phpactor", "language-server"],
"selector": "source.php"
}
}
When I open a .php file and run the LSP: Troubleshoot Server command, I get the following output:
Troubleshooting: phpactor
Version
- LSP: 1.28.0
- Sublime Text: 4169
Server Test Run
- exit code: 127
- output
env: php: No such file or directory
Server Configuration
- command
[
"phpactor",
"language-server"
]
- shell command
phpactor language-server
- selector
source.php
- priority_selector
source.php
- init_options
{}
- settings
{}
- env
{}