Community Laravel Extension for Zed

Last updated on by

Community Laravel Extension for Zed image

Laravel for Zed, by Mike Bronner, is a community extension that adds Laravel awareness to the Zed editor. It runs a Language Server Protocol engine that parses your PHP and Blade files with tree-sitter — static analysis only, no application code executed — to drive features like go-to-definition and rename.

Go-to-Definition Across Laravel Conventions

Laravel's string-based references for things like views, routes, and env are resolved so you can command-click from the references to their source and hover for details. At the time of writing, Laravel for Zed supports this for:

  • Views
  • Blade components
  • Routes
  • Config keys
  • Translations
  • Env values
  • Assets
  • Middleware
  • Container bindings
  • Query-chain columns, relations, and tables
Command-clicking view('welcome') in routes/web.php jumps to welcome.blade.php
Command-clicking view('welcome') in routes/web.php jumps straight to resources/views/welcome.blade.php.

Hover, Find References, and Rename

Hovering a recognized pattern shows an Intelephense-style summary card. Find References locates call sites across the project, including matches inside vendor packages. Rename is atomic: renaming a route, config key, translation, env var, view, component, Livewire reference, middleware, binding, or model class updates every usage in one operation.

Hover card over config('app.name') showing the resolved value from config/services.php
Hovering config('services') surfaces a summary card pointing back to config/services.php.

Autocomplete and Schema-Aware Diagnostics

Autocomplete covers cast types, model properties, query-chain methods, builder methods, Blade variables, and Pennant flags. Diagnostics flag missing views and components, and check query-chain references against your real database schema to catch typos in column and relation names. When something is missing, Quick Actions offer one-click creation of views, components, middleware, features, and migrations.

Schema-backed autocomplete and diagnostics are optional and read your existing database connection from .env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=myapp
DB_USERNAME=root
DB_PASSWORD=secret

MySQL, PostgreSQL, SQLite, and SQL Server are supported.

Blade Editing and the Outline Panel

For Blade templates, the extension adds directive completion, smart bracket expansion, and closing-tag navigation. It also feeds a Laravel-aware view of route and Blade structure into Zed's outline panel and breadcrumbs. To enable LSP-based outlines, turn on document symbols for both languages in settings.json:

{
"languages": {
"PHP": {
"document_symbols": "on"
},
"Blade": {
"document_symbols": "on"
}
}
}
Action card showing the missing view
A diagnostic flags view('welcom') as missing.

Indexing and Caching

The engine indexes every PHP and Blade file at startup and keeps an on-disk cache, so reopening a project is near-instant and only changed files are re-parsed. External edits from a git pull or formatter run are picked up.

Installation

Search for "Laravel" in the Zed extensions marketplace and click install, or build from source by cloning the repository, running cargo build --release in the laravel-lsp/ directory, and using "zed: install dev extension."

The author recommends pairing it with the Laravel Blade, PHP (Intelephense), phpcs, and phpmd extensions. You can view the source and configuration options on GitHub.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

The latest

View all →
Route Metadata Support in Laravel 13.17 image

Route Metadata Support in Laravel 13.17

Read article
Ship AI with Laravel: Failover, Queues, and Middleware for AI Agents image

Ship AI with Laravel: Failover, Queues, and Middleware for AI Agents

Read article
Monitor and Control Schedules, Queues, and Errors in Laravel with Watchtower image

Monitor and Control Schedules, Queues, and Errors in Laravel with Watchtower

Read article
Showcase Your PhpStorm Expertise on LinkedIn image

Showcase Your PhpStorm Expertise on LinkedIn

Read article
Privacy Filter: Detect PII in Text from Laravel image

Privacy Filter: Detect PII in Text from Laravel

Read article
NationForge: A Self-Hosted Admin Panel for Civic Organizations image

NationForge: A Self-Hosted Admin Panel for Civic Organizations

Read article