Magento 2 LSP

•
29
•

Provides advanced language server capabilities for Magento 2, enhancing code navigation and error detection across PHP, XML, and layout files.

The Magento 2 LSP (Language Server Protocol) is designed to streamline development by making Magento 2's complex XML configurations fully navigable. It integrates seamlessly with lightweight editors, allowing developers to jump between PHP classes and their `di.xml` wiring, trace plugin chains, and follow configuration paths with ease. Beyond navigation, it offers real-time diagnostics to catch broken references and common errors as you type, significantly improving code quality and review processes for both human developers and AI coding agents.

主要功能

01Trace the plugin chain, view plugin counts, and jump from plugins to their wrapped methods.
02Catch common Magento 2 errors as you type, flagging broken class references, missing templates, and duplicate plugin names.
03Understand template overrides, navigating between module, theme, and Hyvä compatibility overrides with code lenses.
041 GitHub stars
05Navigate XML configuration like code with go-to-definition and find-references across various Magento XML files.
06Follow config paths from PHP code (e.g., `scopeConfig->getValue`) directly to `system.xml` declarations.

使用案例

01Preventing configuration and code errors early in the development cycle.
02Enhancing the capabilities of AI coding agents by providing deep Magento-specific intelligence.
03Streamlining development and code review processes for Magento 2 projects.