Laravel LSP: A First-Party Language Server Announced at Laracon US 2026
Published on by Paul Redmond
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.