/vscode-php-intellisense

Advanced PHP IntelliSense for Visual Studio Code 🆚💬

Primary LanguageTypeScriptMIT LicenseMIT

PHP IntelliSense

vs marketplace downloads rating build workflow semantic-release

Advanced PHP IntelliSense for Visual Studio Code.

Note: This is a fork of the original project that was de-listed from the marketplace.

Note: This is just the VS Code extension that spawns the actual language server. The language server itself is implemented purely in PHP in its own repository, all features need to be implemented there and all issues should be reported there. You do NOT need to install it manually though, it is bundled in this extension.

Installation

You need at least PHP 7.4 installed for the extension to work. You can either add it to your PATH or set the php.executablePath setting.

Note: PHP 8.0 does work, PHP 8.1 support is work in progress.

I recommend to disable VS Code's built-in PHP IntelliSense by setting php.suggest.basic to false to avoid duplicate suggestions.

Features

Ignore path on initial index

Set php.files.exclude setting to not index glob patterns on startup. Example: "php.files.exclude": [ "generated/**/*" ]. Files are still indexed when opened in editor.

Completion

Completion search demo

Signature Help

Signature help demo

Workspace symbol search

Workspace symbol search demo

Find all References

Find References demo

Go to Definition

Go To Definition demo

Hover

Hover class demo

Hover parameter demo

Find all symbols

Find all symbols demo

Column-accurate error reporting

Error reporting demo

Code style linting

Please use a dedicated extension like PHP CodeSniffer.

Format code

Please use a dedicated extension like PHP CS Fixer.

Todo

  • Rename
  • Signature help

Contributing

Clone whole repository and in root directory execute:

composer install
npm install
npm run build
code .

The last command will open the folder in VS Code. Hit F5 to launch an Extension Development Host with the extension. For working on the language server, the easiest way is to replace the language server installation from composer in vendor/felixfbecker/language-server with a symlink to your local clone.

For guidance on how to work on the language server, please see the language server repository.