Allow Document symbol handler to detect whether ...

hierarchical document symbols are supported by the client.
This commit is contained in:
Kris De Volder
2019-02-08 11:26:35 -08:00
parent 9ac173feb6
commit b391a111a5
4 changed files with 21 additions and 26 deletions

View File

@@ -79,7 +79,7 @@ public class ConcourseLanguageServerInitializer implements InitializingBean {
reconcileEngine.setTypeCollector(models.getAstTypeCache());
this.symbolHandler = CollectionUtil.hasElements(definitionTypes)
? new TypeBasedYamlSymbolHandler(server.getTextDocumentService(), models.getAstTypeCache(), definitionTypes)
? new TypeBasedYamlSymbolHandler(server.getTextDocumentService(), models.getAstTypeCache(), definitionTypes, server::hasHierarchicalDocumentSymbolSupport)
: DocumentSymbolHandler.NO_SYMBOLS;
}