From 227d7cb0015735d07a4a1c80827ed913faf2c804 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Wed, 28 Mar 2018 11:16:55 -0700 Subject: [PATCH] move capabilities to textDocument --- lsp-sample/server/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsp-sample/server/src/server.ts b/lsp-sample/server/src/server.ts index 0242d812..1cbf1ef5 100644 --- a/lsp-sample/server/src/server.ts +++ b/lsp-sample/server/src/server.ts @@ -26,7 +26,7 @@ let shouldSendDiagnosticRelatedInformation: boolean = false; // After the server has started the client sends an initialize request. The server receives // in the passed params the rootPath of the workspace plus the client capabilities. connection.onInitialize((_params): InitializeResult => { - shouldSendDiagnosticRelatedInformation = _params.capabilities && _params.capabilities.diagnosticRelatedInformation; + shouldSendDiagnosticRelatedInformation = _params.capabilities && _params.capabilities.textDocument && _params.capabilities.textDocument.publishDiagnostics && _params.capabilities.textDocument.publishDiagnostics.relatedInformation; return { capabilities: { // Tell the client that the server works in FULL text document sync mode