News

Official Laravel Zed Extension: LSP for PHP & Blade

Published Updated
Official Laravel Zed Extension: LSP for PHP & Blade image

The Laravel team has published an official Laravel extension for Zed that connects Laravel LSP to the editor. Version 0.1.0 landed in Zed's extension registry on July 30th, and it gives you completions, hover information, diagnostics, document links, and code actions in your PHP and Blade files.

Laravel LSP is the first-party language server that was revealed at Laracon US 2026. It knows about your application, so it can complete config keys, route names, view paths, translation strings, middleware, container bindings, Livewire components, and Inertia pages, then flag the ones that don't exist. The Zed extension is the piece that wires all of that into the editor for you.

Getting Started

Open the Extensions page from Zed's command palette with zed: extensions, search for Laravel (Official), and click Install. That's it. You don't need to install laravel/lsp yourself, since the extension downloads the language server binary and then checks for updates at most once every two hours.

No configuration is required by default. If you do want to pass initialization options to the server, you can set them under lsp.laravel.initialization_options in your Zed settings:

{
"lsp": {
"laravel": {
"initialization_options": {
"phpEnvironment": "sail"
}
}
}
}

Here phpEnvironment tells the server how to find a working PHP command for indexing your project. It defaults to auto, which tries Herd, Valet, Sail, Lando, DDEV, and then local PHP. Every individual LSP feature can be toggled through the same options object, and the full list lives in the Laravel LSP repo.

This isn't the only Laravel extension for Zed. Mike Bronner's community Laravel extension is still actively developed, and the two take different approaches. Laravel LSP runs PHP scripts in your project to ask the framework directly, which is what phpEnvironment is for, while the community server parses your files with tree-sitter and never runs your application. The community README recommends against running both at once, so pick the one that fits how you work.

Zed now joins Sublime Text, Cursor, and the Laravel VS Code extension with official support, and Neovim and OpenCode can point at the same server with a few lines of config.

Read more

The extension is MIT licensed, and you can install it from the Zed extension page or browse the source on the laravel/zed-extension GitHub repo.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

masteringlaravel logo
Laravel Code Review

Get expert guidance in a few days with a Laravel code review

Visit Laravel Code Review

The latest

View all →
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article