Source:
private HoverDto hover(TextDocumentPositionParams positionParams) { String wsPath = positionParams.getTextDocument().getUri(); String uri = prefixURI(wsPath); positionParams.getTextDocument().setUri(uri); positionParams.setUri(prefixURI(positionParams.getUri())); Hover result = new Hover(); StringBuilder content = new StringBuilder(); Set<ExtendedLanguageServer> servers = findServer.byPath(uri); OperationUtil.doInParallel( servers, new LSOperation<ExtendedLanguageServer, Hover>() { @Override public boolean canDo(ExtendedLanguageServer element) { return truish(element.getCapabilities().getHoverProvider()); } @Override public CompletableFuture<Hover> start(ExtendedLanguageServer element) { return element.getTextDocumentService().hover(positionParams); } @Override public boolean handleResult(ExtendedLanguageServer element, Hover hover) { if (hover != null) { Either<List<Either<String, MarkedString>>, MarkupContent> contents = hover.getContents(); if (contents == null) { return true; } if (contents.isLeft()) { for (Either<String, MarkedString> part : contents.getLeft()) { if (content.length() > 0) { content.append("\n\n"); } if (part.isLeft()) { content.append(part.getLeft()); } else { content.append(part.getRight().getValue()); } } } else { MarkupContent markup = contents.getRight(); if (MarkupKind.MARKDOWN.equals(markup.getKind()) || MarkupKind.PLAINTEXT.equals(markup.getKind())) { if (content.length() > 0) { content.append("\n\n"); } content.append(markup.getValue()); } else { LOG.warn("Unknown markup type: {}", markup.getKind()); } } } return true; } }, 10000); MarkupContent markupContent = new MarkupContent(); markupContent.setKind(MarkupKind.MARKDOWN); markupContent.setValue(content.toString()); result.setContents(markupContent); return new HoverDto(result); }

Target:
private HoverDto hover(TextDocumentPositionParams positionParams) { String wsPath = positionParams.getTextDocument().getUri(); String uri = prefixURI(wsPath); positionParams.getTextDocument().setUri(uri); positionParams.setUri(prefixURI(positionParams.getUri())); Hover result = new Hover(); StringBuilder content = new StringBuilder(); Set<ExtendedLanguageServer> servers = findServer.byPath(uri); OperationUtil.doInParallel( servers, new LSOperation<ExtendedLanguageServer, Hover>() { @Override public boolean canDo(ExtendedLanguageServer element) { return truish(element.getCapabilities().getHoverProvider()); } @Override public CompletableFuture<Hover> start(ExtendedLanguageServer element) { return element.getTextDocumentService().hover(positionParams); } @Override public boolean handleResult(ExtendedLanguageServer element, Hover hover) { if (hover != null) { Either<List<Either<String, MarkedString>>, MarkupContent> contents = hover.getContents(); if (contents == null) { return false; } if (contents.isLeft()) { for (Either<String, MarkedString> part : contents.getLeft()) { if (content.length() > 0) { content.append("\n\n"); } if (part.isLeft()) { content.append(part.getLeft()); } else { content.append(part.getRight().getValue()); } } } else { MarkupContent markup = contents.getRight(); if (MarkupKind.MARKDOWN.equals(markup.getKind()) || MarkupKind.PLAINTEXT.equals(markup.getKind())) { if (content.length() > 0) { content.append("\n\n"); } content.append(markup.getValue()); } else { LOG.warn("Unknown markup type: {}", markup.getKind()); } } } return true; } }, 10000); MarkupContent markupContent = new MarkupContent(); markupContent.setKind(MarkupKind.MARKDOWN); markupContent.setValue(content.toString()); result.setContents(markupContent); return new HoverDto(result); }