Skip to content

Add devsense-php-ls LSP support #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jakubmisek
Copy link

@jakubmisek jakubmisek commented Jun 6, 2025

This pull request adds support for devsense-php-ls, the language server used by the PHP Tools extension for Visual Studio Code.

This language server offers a comprehensive PHP development experience (within the limits of the LSP protocol), including:

  • Laravel IDE features
  • Support for PhpStan, Psalm, and other PHPDoc annotations
  • Code completion
  • Inlay hints
  • Code diagnostics
  • Code navigation
  • Code folding
  • And more

Configuration

Once the extension is installed, the language server can be enabled via settings. A separate PR will be submitted to update https://github.com/zed-industries/zed/blob/main/docs/src/languages/php.md after this PR is merged.

"languages": {
  "PHP": {
    "language_servers": ["phptools", "!intelephense", "!phpactor", "..."]
  }
}

Next Steps

After this is merged, I plan to:

  • Add more PHP-specific features
  • Document the freemium licensing model
  • Reference the extension on our website
  • Promote it via social media

This comment was marked as resolved.

@jakubmisek

This comment was marked as resolved.

@cla-bot cla-bot bot added the cla-signed label Jun 6, 2025

This comment was marked as resolved.

@notpeter
Copy link
Contributor

notpeter commented Jun 6, 2025

Exciting! I was not familiar with the phptools LSP, but I would love for Zed to support it! I'm not sure want to immediately ship with it as the default, both because it's untested, but also because we prefer to not auto-download proprietary binaries by default.

That said, I know user's experience with phpactor has not been amazing and I would love to improve the experience for coding PHP in Zed. Looking forward to testing it out.

@notpeter notpeter changed the title Add Support for devsense-php-ls Language Server Add devsense-php-ls LSP support Jun 6, 2025
@jakubmisek
Copy link
Author

Thank you @notpeter - we're excited to have our LSP in Zed. It surely needs to be tested first, and we're keen to improve or update features to fit in Zed's user experience.

Some features need to be implemented outside the LS in Rust code - but that's for another PR. (for example the activation can be added as a Zed command).

@ADmad
Copy link

ADmad commented Jun 7, 2025

That said, I know user's experience with phpactor has not been amazing

Seeing the "Resolving code actions" flash in the status bar, every time you move the cursor, itself is pretty annoying 🙂

@rabol
Copy link

rabol commented Jun 12, 2025

cannot wait to see this merged!

@jakubmisek
Copy link
Author

Note: the binary ./bin/devsense-php.ls needs to be chmod'ed +x
This will be fixed in the next update of https://www.npmjs.com/package/devsense-php-ls

Thanks @rabol for quick testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants