private static Hover getFieldHover(Node node, EventPositionContext context) {
        Optional<Symbol> fieldDefinitionSymbol = context.schemaIndex.getSymbolDefinition(node.getSymbol());

        if (fieldDefinitionSymbol.isEmpty()) return null;

        Optional<Node> dataTypeNode = context.schemaIndex.fieldIndex().getFieldDataTypeNode(fieldDefinitionSymbol.get());
        
        String typeText = "unknown";
        if (dataTypeNode.isPresent()) {
            typeText = dataTypeNode.get().getText().trim();
        }

        // Create a nice long identifier for nested fields (e.g. field of type struct)
        String fieldIdentifier = fieldDefinitionSymbol.get().getShortIdentifier();
        Symbol scopeIterator = fieldDefinitionSymbol.get().getScope();
        while (scopeIterator != null && scopeIterator.getType() == SymbolType.FIELD) {
            fieldIdentifier = scopeIterator.getShortIdentifier() + "." + fieldIdentifier;
            scopeIterator = scopeIterator.getScope();
        }

        String hoverText = "field " + fieldIdentifier + " type " + typeText;

        if (context.schemaIndex.fieldIndex().getIsInsideDoc(fieldDefinitionSymbol.get())) {
            if (fieldDefinitionSymbol.get().getScope() != null && fieldDefinitionSymbol.get().getScope().getType() == SymbolType.STRUCT) {
                hoverText += " (in struct " + fieldDefinitionSymbol.get().getScope().getShortIdentifier() + ")";
            } else {
                hoverText += " (in document)";
            }
        } else {
            hoverText += " (outside document)";
        }

        var indexingTypes = context.schemaIndex.fieldIndex().getFieldIndexingTypes(fieldDefinitionSymbol.get()).toArray();
        // We simulate some kind of indexing statement
        for (int i = 0; i < indexingTypes.length; ++i) {
            if (i == 0) hoverText += "\n\t";
            else hoverText += " | ";
            hoverText += indexingTypes[i].toString().toLowerCase();
        }

        String fieldDefinitionDocumentContent = context.scheduler.getDocument(fieldDefinitionSymbol.get().getFileURI()).getCurrentContent();
        Optional<String> documentationComments = getSymbolDocumentationComments(fieldDefinitionSymbol.get().getNode(), fieldDefinitionDocumentContent);

        if (documentationComments.isPresent()) {
            hoverText = documentationComments.get() + "\n" + hoverText;
        }

        // Render as code
        return new Hover(new MarkupContent(MarkupKind.MARKDOWN, "```\n" + hoverText + "\n```"));
    }
Special handling of field hover to also list which indexing settings are set (index | attribute | summary)
as well as whether the field is inside or outside its document.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/hover/SchemaHover.java