private Optional<MarkupContent> getFileHover(String tagName, List<String> pathElements) {
        Path readPath = serverPath.resolve("hover");

        if (!serverPath.toFile().exists()) {
            logger.warning("Could not get hover content because services hover does not exist!");
            return Optional.empty();
        }

        for (String element : pathElements) {
            if (readPath.resolve(element).toFile().exists()) {
                readPath = readPath.resolve(element);
            }
        }

        String fileName = sanitizeFileName(tagName + ".md");
        readPath = readPath.resolve(fileName);

        if (!readPath.toFile().exists()) {
            logger.warning(readPath.toString() + " did not exist!");
            return Optional.empty();
        }

        try {
            String content = Files.readString(readPath);
            MarkupContent mdContent = new MarkupContent(MarkupKind.MARKDOWN, content);
            return Optional.of(mdContent);
        } catch (Exception ex) {
            logger.severe("Unknown exception: " + ex.getMessage());
        }
        return Optional.empty();
    }
TODO: refactor and handle tags with the same name based on context.
integration/schema-language-server/lemminx-vespa/src/main/java/ai/vespa/lemminx/participants/HoverParticipant.java