extensions/felixfbecker.php-intellisense-0.0.12/vendor/felixfbecker/language-server/src/LanguageServer.php
/**
     * The initialize request is sent as the first request from the client to the server.
     *
     * @param int $processId The process Id of the parent process that started the server.
     * @param ClientCapabilities $capabilities The capabilities provided by the client (editor)
     * @param string|null $rootPath The rootPath of the workspace. Is null if no folder is open.
     * @return InitializeResult
     */
The initialize request is sent as the first request from the client to the server.
@param int $processId The process Id of the parent process that started the server.
@param ClientCapabilities $capabilities The capabilities provided by the client (editor)
@param string|null $rootPath The rootPath of the workspace. Is null if no folder is open.
The initialize request is sent as the first request from the client to the server . @param int $processId The process Id of the parent process that started the server . @param ClientCapabilities $capabilities The capabilities provided by the client ( editor ) @param string|null $rootPath The rootPath of the workspace . Is null if no folder is open .
public function initialize(int $processId, ClientCapabilities $capabilities, string $rootPath = null): InitializeResult
    {
        $this->rootPath = $rootPath;
        $this->clientCapabilities = $capabilities;
        $this->project = new Project($this->client, $capabilities);
        $this->textDocument = new Server\TextDocument($this->project, $this->client);
        $this->workspace = new Server\Workspace($this->project, $this->client);
        if ($rootPath !== null) {
            $this->indexProject()->otherwise('\\LanguageServer\\crash');
        }
        $serverCapabilities = new ServerCapabilities();
        $serverCapabilities->textDocumentSync = TextDocumentSyncKind::FULL;
        $serverCapabilities->documentSymbolProvider = true;
        $serverCapabilities->workspaceSymbolProvider = true;
        $serverCapabilities->documentFormattingProvider = true;
        $serverCapabilities->definitionProvider = true;
        $serverCapabilities->referencesProvider = true;
        $serverCapabilities->hoverProvider = true;
        return new InitializeResult($serverCapabilities);
    }
public function initialize ( int $ processId , ClientCapabilities $ capabilities , string $ rootPath = null ) : InitializeResult { $ this -> rootPath = $ rootPath ; $ this -> clientCapabilities = $ capabilities ; $ this -> project = new Project ( $ this -> client , $ capabilities ) ; $ this -> textDocument = new Server \ TextDocument ( $ this -> project , $ this -> client ) ; $ this -> workspace = new Server \ Workspace ( $ this -> project , $ this -> client ) ; if ( $ rootPath !== null ) { $ this -> indexProject ( ) -> otherwise ( '\\LanguageServer\\crash' ) ; } $ serverCapabilities = new ServerCapabilities ( ) ; $ serverCapabilities -> textDocumentSync = TextDocumentSyncKind :: FULL ; $ serverCapabilities -> documentSymbolProvider = true ; $ serverCapabilities -> workspaceSymbolProvider = true ; $ serverCapabilities -> documentFormattingProvider = true ; $ serverCapabilities -> definitionProvider = true ; $ serverCapabilities -> referencesProvider = true ; $ serverCapabilities -> hoverProvider = true ; return new InitializeResult ( $ serverCapabilities ) ; }
The initialize request is sent as the first request from the client to the server.
The initialize request is sent as the first request from the client to the server .
// start building project index // Ask the client to return always full documents (because we need to rebuild the AST from scratch) // Support "Find all symbols" // Support "Find all symbols in workspace" // Support "Format Code" // Support "Go to definition" // Support "Find all references" // Support "Hover"