Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lsp Laravel Package

laravel/lsp

Laravel LSP adds framework-aware editor support for Laravel and Blade, with completions, hovers, diagnostics, document links, Go to Definition, and code actions across routes, views, translations, config, and env vars. Install globally via Composer and launch over stdio from your project root.

View on GitHub
Deep Wiki
Context7

Laravel LSP is a framework-aware language server that brings rich editor intelligence to Laravel applications and Blade templates. Installed globally via Composer, it communicates over stdio and integrates with official extensions for VS Code, Cursor, Sublime Text, and Zed, plus custom setups for Neovim 0.11+ and OpenCode.

  • Completions and hovers for routes, views, translations, config keys, and environment variables
  • Diagnostics that catch Laravel-specific mistakes before runtime
  • Go to Definition and document links across framework references
  • Code actions for Blade and Laravel code
  • Root-aware startup that activates only inside real Laravel projects
Frequently asked questions about Lsp
How do I install and set up Laravel LSP?
Install it globally with Composer using composer global require laravel/lsp, then make sure Composer's global bin directory is on your PATH so the laravel-lsp binary is discoverable. Next, install the official extension for your editor, which launches the server over stdio from your Laravel project root. There is no application-side installation step: nothing is added to composer.json, no service provider is registered, and nothing needs to be deployed.
Which editors and IDEs support Laravel LSP?
Because the server speaks the standard Language Server Protocol over stdio, it is editor-agnostic, and Laravel ships first-party extensions for VS Code, Cursor (via the VS Code extension), Sublime Text, and Zed. Neovim 0.11+ works through a documented manual LSP configuration that sets the command to laravel-lsp, filetypes to php and blade, and a root_dir callback based on the artisan file. OpenCode can also register it as a custom LSP server. Any other LSP-capable client can connect the same way, but you will need to write the config yourself.
Can I install laravel/lsp as a project dev dependency instead of globally?
The README only documents a global Composer install, so a per-repo dev dependency is not an officially documented workflow. Since the package is a normal Composer package that exposes a laravel-lsp binary, installing it as a dev dependency and launching it from vendor/bin is the obvious way to pin a version per repository and reuse it in devcontainers or CI. Validate that path in a pilot before standardizing, because the global install is the supported default and a single global server version is otherwise shared across every Laravel project on the machine.
Which PHP and Laravel versions does Laravel LSP support?
The README does not publish a compatibility table for minimum PHP or supported Laravel versions, so treat the support matrix as something to verify against your own projects. This matters more than usual because a globally installed server is shared by every Laravel app on a developer's machine, and a server built around one Laravel generation may produce subtly wrong completions or diagnostics on an older app. Pin the version explicitly with composer global require laravel/lsp:<version> if reproducibility across a team matters.
Does Laravel LSP need a database or a bootable Laravel app to index a project?
This is not documented in the README, and it is the most important operational question for onboarding and CI. The server is started by the editor from the Laravel project root and analyzes routes, Blade views, translations, config, and environment variables, which usually implies reading application files rather than requiring a running database. Test the behavior in a fresh clone and in a container without a database or populated .env before assuming it will work there.
How does Laravel LSP differ from Larastan, PHPStan, and Pint?
Laravel LSP is an editor-time tool: it provides completions, hovers, document links, Go to Definition, code actions, and in-editor diagnostics for Laravel and Blade constructs. Larastan and PHPStan are static analyzers you gate in CI, and Pint handles code style. They are complementary, but framework-aware diagnostics are heuristic, so define a clear boundary, such as LSP for navigation and quick feedback plus Larastan for CI gates, to avoid developers seeing conflicting warnings for the same code.
Does Laravel LSP work in monorepos or non-standard Laravel layouts?
Root detection is anchored on the presence of an artisan file, which is a clean convention for standard Laravel skeletons but a real constraint elsewhere. Monorepos with several sub-applications, custom directory layouts, Laravel Zero projects, and packages using Orchestra Testbench all need validation, particularly the question of how multiple artisan roots in one workspace are handled. The documented Neovim config only starts the server when an artisan file is found, so non-Laravel PHP projects are left alone by design.
How does Laravel LSP perform on large Laravel codebases?
Indexing behavior, memory ceilings, and responsiveness on large projects are not documented in the README, so measure them rather than assume. Pay attention to startup time, memory growth during long editor sessions, and what happens after branch switches or composer update when many files change at once. Run the pilot on your largest real application, not a fresh skeleton, because that is where an editor language server usually shows its limits.
Does Laravel LSP affect my production application or send telemetry?
No production impact: it is a developer-tooling package installed globally, it never enters composer.json or composer.lock, and it is not deployed or loaded during requests. It runs locally on the developer workstation and communicates with the editor over stdio. Telemetry is not described in the README, so check the release notes and issue tracker before an organization-wide rollout if that is a policy requirement.
How is Laravel LSP maintained and how often is it released?
It is a first-party Laravel package under active early development, so its current maturity is best described as README-plus-releases rather than a long documented history. It has no Packagist dependents, which is expected for a leaf developer tool and is not a meaningful quality signal either way. Judge it on first-party maintenance and adoption, watch the release cadence, and avoid assuming documented behavior for edge cases until you have confirmed it yourself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager