[ALARM] This is not the final version!
LSP is a protocol for interaction with a client using the JSON-RPC 2.0 codec, where arbitrary editors and IDEs act as clients.
The protocol is supported by many clients, such as:
Most Popular Editors:
Most Popular IDE:
- JetBrains (PhpStorm, IDEA, RustRover, GoLand, etc)
- GigaIDE Desktop
- Eclipse
- Emacs
- QT Creator
- RAD Studio
- Visual Studio
- ...etc
This project gives you the opportunity to write your own plugins for any editor or IDE using the PHP language!
# create an extension application
composer create-project php-lsp/skeleton
# allow build script to run (required once)
chmod +x bin/build
php ./bin/lsp serve App\\Application --port=5007
<?php
declare(strict_types=1);
require __DIR__ . '/vendor/autoload.php';
$app = new \App\Application('dev', true);
$app->listen('tcp://127.0.0.1:5007');
# build server assembly
composer build
# run server assembly
composer run
# build server assembly
./bin/build
# run server assembly
php ./var/prod/build.phar serve App\\Application --port=5007
Please note that these are just extension examples. Unification of the assembly without code (JS, Java, C#, etc) modification will come later, perhaps.
See client/vscode/package.json to modify the configuration.
- Build and run editor:
# move to vscode workspace cd client/vscode # install dependencies npm install # run client code .
- Then press
F5
(in editor) to run extension