Skip to content

Commit

Permalink
back to really long existence checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Oct 21, 2019
1 parent e837fe0 commit 8fc85c0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,16 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
}
workspaceFolders = params.workspaceFolders || [];

if (capabilities.textDocument) {
const { documentSymbol, rangeFormatting } = capabilities.textDocument;
hierarchicalDocumentSymbolSupport = !!(documentSymbol && documentSymbol.hierarchicalDocumentSymbolSupport);
clientDynamicRegisterSupport = !!(rangeFormatting && rangeFormatting.dynamicRegistration);
}
hierarchicalDocumentSymbolSupport = !!(
capabilities.textDocument &&
capabilities.textDocument.documentSymbol &&
capabilities.textDocument.documentSymbol.hierarchicalDocumentSymbolSupport
);
clientDynamicRegisterSupport = !!(
capabilities.textDocument &&
capabilities.textDocument.rangeFormatting &&
capabilities.textDocument.rangeFormatting.dynamicRegistration
);

return {
capabilities: {
Expand Down

0 comments on commit 8fc85c0

Please sign in to comment.