Official Laravel Zed Extension: LSP Support for PHP and Blade Files
Laravel PHP #Laravel #Zed #LSP #PHP #Blade #Developer Tools

Official Laravel Zed Extension: LSP Support for PHP and Blade Files

3 min read Mohamed Said Mohamed Said

Official Laravel Zed Extension Brings First-Party LSP Support

The Laravel team published an official extension for the Zed editor on July 30, 2026. Version 0.1.0 landed in Zed's extension registry and connects Laravel LSP — the first-party language server announced at Laracon US 2026 — directly to the editor.

Once installed, you get the following LSP features in your PHP and Blade files:

  • Completions for config keys, route names, view paths, translation strings, middleware, container bindings, Livewire components, and Inertia pages
  • Hover information on Laravel-specific symbols
  • Diagnostics that flag references to config keys, routes, or views that don't exist
  • Document links and code actions

How to Install

Installation is straightforward. Open Zed's command palette and run zed: extensions, search for Laravel (Official), and click Install. You do not need to install laravel/lsp separately — the extension downloads the language server binary automatically and checks for updates at most once every two hours.

Configuration

No configuration is required out of the box. If you need to pass initialization options to the server, add them under lsp.laravel.initialization_options in your Zed settings file:

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

The phpEnvironment option tells the language server which PHP command to use when indexing your project. It defaults to auto, which probes Herd, Valet, Sail, Lando, DDEV, and then a locally installed PHP binary in that order. Every individual LSP feature can also be toggled through the same initialization_options object; the full reference is available in the Laravel LSP GitHub repository.

Official vs. Community Extension

This is not the only Laravel extension available for Zed. Mike Bronner's community Laravel extension remains actively developed and takes a fundamentally different approach:

| | Official (Laravel LSP) | Community | |---|---|---| | How it works | Runs PHP scripts inside your project to query the framework directly | Parses files with tree-sitter; never executes your application | | Requires PHP env | Yes (phpEnvironment option) | No | | Framework awareness | Deep (routes, views, config, bindings, etc.) | Static analysis only |

The community extension's README recommends against running both extensions simultaneously, so choose the one that best fits your workflow.

Editor Support Landscape

With this release, Zed joins Sublime Text, Cursor, and the Laravel VS Code extension as editors with official Laravel LSP support. Neovim and OpenCode users can also point at the same language server binary with a few lines of configuration.

Key Takeaways

  • The official Laravel Zed extension (v0.1.0) was released on July 30, 2026.
  • It bundles and auto-updates the Laravel LSP binary — no separate install needed.
  • Provides completions, hover info, diagnostics, document links, and code actions for PHP and Blade.
  • The phpEnvironment setting controls which PHP runtime the server uses for project indexing.
  • Avoid running it alongside the community Zed extension at the same time.
  • The extension is MIT licensed; source is on laravel/zed-extension.

Source: Official Laravel Zed Extension: LSP for PHP & Blade — Laravel News

Found this useful?

Frequently Asked Questions

3 questions
Q01 Do I need to install laravel/lsp separately to use the official Laravel Zed extension?
No. The extension downloads the Laravel LSP binary automatically and checks for updates at most once every two hours, so no manual installation of the language server is required.
Q02 Can I run the official Laravel Zed extension alongside the community Laravel extension for Zed?
The community extension's README recommends against running both at the same time, as they take different approaches to providing Laravel intelligence. Pick the one that suits your workflow.
Q03 What does the phpEnvironment option do in the Laravel Zed extension settings?
It tells the language server which PHP runtime to use when indexing your project. The default value is 'auto', which tries Herd, Valet, Sail, Lando, DDEV, and then a local PHP binary in that order. You can set it explicitly to a value like 'sail' if needed.

Continue reading

More Articles

View all