Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -347,9 +347,12 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
if (params.rootUri) {
workspaceRoot = URI.parse(params.rootUri);
}
workspaceFolders = params.workspaceFolders;
hierarchicalDocumentSymbolSupport = !!capabilities.textDocument.documentSymbol.hierarchicalDocumentSymbolSupport;
clientDynamicRegisterSupport = !!(capabilities.textDocument.rangeFormatting && capabilities.textDocument.rangeFormatting.dynamicRegistration);
workspaceFolders = params.workspaceFolders || [];

const { documentSymbol, rangeFormatting } = capabilities.textDocument || {};

hierarchicalDocumentSymbolSupport = !!(documentSymbol && documentSymbol.hierarchicalDocumentSymbolSupport);
clientDynamicRegisterSupport = !!(rangeFormatting && rangeFormatting.dynamicRegistration);

return {
capabilities: {

0 comments on commit ea14363

Please sign in to comment.