This Visual Studio Code extension highlights deprecated Drupal code.
It relies on drupal-check
Before installing the extension ensure drupal-check is installed.
composer global require mglaman/drupal-check
In Visual Studio Code settings, find the Drupal Check: Executable Path setting, and configure it to point to the drupal-check
executable from your global Composer installation. For example:
/path/to/.composer/vendor/mglaman/drupal-check/drupal-check
Note: Run composer global show -P
to get a list global packages and their paths.
- Install the Visual Studio Code npm extension
- Clone this repository.
- Open the repository directory using Visual Studio Code
- Run VS Code task
npm install
To get a development environment setup:
- Open workspace using Visual Studio Code
- Then Terminal >
Run Build Task
(this should startnpm watch
and watch for .ts changes) - Select sidebar option
Debug
- Select and Run dropdown option
Launch Client
. This will launch another VSC window [Extension Development Host]. - Open a Drupal workspace/directory and a PHP file (this helps the LSP Server)
- Select and Run dropdown option
Attach to Server
.
This extension was based off Microsoft's Language Server Extension sample and the VS Code phpcs extension. And this extension would not be possible without drupal-check.
Please file issues on GitHub.