From 09c287d5ed4c73630949bf00ad19a0499ee33c25 Mon Sep 17 00:00:00 2001 From: Iku Iwasa Date: Wed, 2 Oct 2019 00:05:03 +0900 Subject: [PATCH] Correct capability to check rangeFormatting dynamic registration Use textDocument.rangeFormatting.dynamicRegistration instead of workspace.symbol.dynamicRegistration. --- src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 08247ee2..2674779e 100755 --- a/src/server.ts +++ b/src/server.ts @@ -349,7 +349,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { } workspaceFolders = params.workspaceFolders; hierarchicalDocumentSymbolSupport = !!capabilities.textDocument.documentSymbol.hierarchicalDocumentSymbolSupport; - clientDynamicRegisterSupport = !!capabilities.workspace.symbol.dynamicRegistration; + clientDynamicRegisterSupport = !!(capabilities.textDocument.rangeFormatting && capabilities.textDocument.rangeFormatting.dynamicRegistration); return { capabilities: {