Laravel LSP: A First-Party Language Server Announced at Laracon US 2026

Published on by

Laravel LSP: A First-Party Language Server Announced at Laracon US 2026 image

Taylor Otwell revealed Laravel LSP on stage during Day One of Laracon US 2026. It's a first-party language server that teaches your editor about your Laravel application: config keys, route names, view paths, translation strings, middleware aliases, container bindings, and more:

Framework-aware editor intelligence for configuration, routes, bindings, Eloquent, and more. With support for Sublime Text, Zed, Neovim, Cursor, and more.

Laravel already ships an official VS Code extension, but developers on other editors have relied on community projects for this kind of Laravel-specific autocomplete. Laravel LSP moves that work into a standalone server that speaks the Language Server Protocol over stdio, so any editor with an LSP client can use it.

What It Knows About Your App

The server indexes your project and answers editor requests against it. In the demo, typing config('app.time inside a controller produced a completion list of matching config keys with their resolved values next to them (app.timezone showing UTC), and an incomplete key registered as a diagnostic reading "Config [ap] not found."

Coverage spans most of the string-keyed parts of the framework, per the feature table in the README:

Area Capabilities
Routes Completions, hovers, diagnostics, document links
Views and Blade Completions, hovers, diagnostics, links, fixes
Translations Key, locale, and parameter completions; hovers
Config Key completions, hovers, diagnostics, links
Environment variables Completions, hovers, diagnostics, links, fixes
Assets and Mix Completions, hovers, diagnostics, links
Middleware Completions, hovers, diagnostics, links
Inertia Page and property completions, links, diagnostics
Livewire components Completions, hovers, links
Auth and policies Completions, hovers, diagnostics, links
Container bindings Completions, hovers, diagnostics, links
Validation rules Completions
Controller actions Completions, diagnostics, links
Eloquent Completions

Document links are the piece that makes view('orders.index') and route('orders.show') clickable, and the same data backs go-to definition, which is on by default.

Installation

Install it globally with Composer and make sure Composer's global vendor bin directory is on your PATH:

composer global require laravel/lsp

The package requires PHP 8.2 or newer and ships prebuilt binaries for macOS (arm64 and x64), Linux (arm64 and x64), and Windows (x64).

Editor Setup

Sublime Text, Zed, and VS Code each have an official Laravel extension that handles the wiring for you, and Cursor works with the VS Code extension. Neovim and OpenCode need a small amount of configuration.

For Neovim 0.11 or newer:

vim.lsp.config("laravel_lsp", {
cmd = { "laravel-lsp" },
filetypes = { "php", "blade" },
root_markers = { "artisan", "composer.json", ".git" },
})
 
vim.lsp.enable("laravel_lsp")

For OpenCode, enable LSP support in opencode.json and register the server:

{
"$schema": "https://opencode.ai/config.json",
"lsp": {
"laravel-lsp": {
"command": ["laravel-lsp"],
"extensions": [".php", ".blade.php"]
}
}
}

Telling It Which PHP to Use

The server runs scripts against your project to build its index, so it needs a working PHP command. The phpEnvironment option, passed through the LSP initializationOptions object, controls how that command is found. It defaults to auto, which tries Herd, Valet, Sail, Lando, DDEV, and then local PHP. You can pin it to any one of those, or skip detection entirely with an explicit phpCommand array such as ["./vendor/bin/sail", "php"].

Every feature is individually toggleable through the same options object. Each capability has its own boolean, so you can turn off, say, route diagnostics with routeDiagnostics while keeping route completions. There are also two Pest options: pestGenerateDocBlocks keeps generated Pest helper docblocks up to date as tests and autoload files change, and pestHelperFilePath sets where that file is written.

Learn More

You can read the full configuration reference, editor setup instructions, and source code on the Laravel LSP GitHub repository.

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
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech
Laravel Cloud logo

Laravel Cloud

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

Laravel Cloud
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
Tinkerwell logo

Tinkerwell

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

Tinkerwell
Shift logo

Shift

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

Shift
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
PhpStorm logo

PhpStorm

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

PhpStorm
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
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
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
Lucky Media logo

Lucky Media

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

Lucky Media

The latest

View all →
Watch Laracon US 2026 Live on YouTube image

Watch Laracon US 2026 Live on YouTube

Read article
Monthly Log Driver in Laravel 13.23 image

Monthly Log Driver in Laravel 13.23

Read article
Pinion UI: Restyle an Entire Laravel App by Changing Two HTML Attributes image

Pinion UI: Restyle an Entire Laravel App by Changing Two HTML Attributes

Read article
Building a Live Match Scoreboard With Laravel Reverb image

Building a Live Match Scoreboard With Laravel Reverb

Read article
BindWhen Container Attribute in Laravel 13.22 image

BindWhen Container Attribute in Laravel 13.22

Read article
Building and Deploying a Laravel App With Claude Code on Zerops image

Building and Deploying a Laravel App With Claude Code on Zerops

Read article