Я изучаю LSP и сейчас пытаюсь получить символы документа.Я использую Felix Becker PHP language server .Независимо от того, что я пытаюсь, я не могу вернуть символы.
Я пытался записать то, что получает языковой сервер, и вот оно (попытался опустить конфиденциальные данные):
{"id":1,"method":"initialize","params":{"initializationOptions":{},"rootUri":"file:\/\/\/Users\/stef\/Projects\/TestApp","capabilities":{},"rootPath":"\/Users\/stef\/Projects\/TestApp","trace":"verbose","processId":null,"workspaceFolders":[{"uri":"file:\/\/\/Users\/stef\/Projects\/TestApp","name":"TestApp"}]},"jsonrpc":"2.0"}
{"id":2,"method":"initialized","params":{},"jsonrpc":"2.0"}
{"id":3,"method":"textDocument\/didOpen","params":{"textDocument":{"uri":"file:\/\/\/Users\/stef\/Projects\/TestApp\/models\/User.php","languageId":"php","version":1,"text":"<?php\\n\\nnamespace app\\models;\\n\\nuse Yii;\\n\\n\/**\\n * This is the model class for table \"Users\".\\n *\\n * @property integer $id\\n * @property string $User\\n * @property integer $route\\n * @property string $bus\\n * @property string $start\\n * @property string $end\\n * @property string $dept_date\\n * @property string $dept_time\\n * @property integer $customer\\n * @property integer $issued_on\\n * @property string $machine_serial\\n * @property integer $price\\n * @property integer $is_deleted\\n * @property string $OOOPS\\n * @property integer $expired_in\\n * @property integer $created_at\\n * @property integer $created_by\\n * @property integer $updated_at\\n * @property integer $updated_by\\n *\\n * @property PlannedRoutes $deptDate\\n * @property Buses $bus0\\n * @property Customers $customer0\\n * @property Stops $end0\\n * @property POSes $machineSerial\\n * @property Routes $route0\\n * @property Stops $start0\\n *\/\\nclass User extends TenantModel\\n{\\n use \\app\\traits\\Signature;\\n\\n const OOOPS_KOOK = 'BO';\\n const OOOPS_TEMPORARY_KOOK = 'BT';\\n const OOOPS_CANCELLED = 'CA';\\n const OOOPS_CONFIRMED = 'CO';\\n const OOOPS_FOOF_User = 'CT';\\n const OOOPS_FREE = 'FR';\\n \\n public $RWF;\\n public $UGS;\\n public $FIB;\\n public $USD;\\n public $seats; \/\/ total bus seats\\n public $Users; \/\/ sold Users\\n public $bookings; \/\/ valid bookings\\n public $promotion; \/\/ Promotion Users\\n public $staff; \/\/ Staff Users\\n public $location; \/\/ Staff Location\\n public $day; \/\/ User day like Monday\\n public $author; \/\/ Staff who created User\\n public $broute; \/\/ Main Route\\n \\n public $FOOFs; \/\/total FOOFs sold\\n public $crevenue; \/\/total FOOFs Revenue\\n \/**\\n * @inheritdoc\\n *\/\\n ....some sensitive data omitted...}}},"jsonrpc":"2.0"}
{"id":4,"method":"textDocument\/documentSymbol","params":{"textDocument":{"uri":"file:\/\/\/Users\/stef\/Projects\/TestApp\/models\/User.php"}},"jsonrpc":"2.0"}
иВот зарегистрированный ответ от сервера
- Много
{"method":"window\/logMessage","params"....
- Много
{"method":"textDocument\/publishDiagnostics"...
Наконец я получаю
{"result":null,"id":3,"jsonrpc":"2.0"}Content-Type: application/vscode-jsonrpc; charset=utf8
Content-Length: 36
Я не могу найти, почему сервер не отвечает с символами.Я попробовал VS Plugin того же автора, и он работает нормально, что означает, что я где-то испортил.Но не могу просто понять это!
Любая помощь приветствуется.