private static Range getSymbolRange(Symbol symbol) {
        if (symbol.getNode().getParent() == null) return symbol.getNode().getRange();

        if (symbol.getType() == SymbolType.PARAMETER) return symbol.getNode().getRange();

        return symbol.getNode().getParent().getRange();
    }
The range of a symbol should enclose the entirety of its definition including a body. 
This allows UI to display the hierarchy at the cursor position.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/documentsymbols/SchemaDocumentSymbols.java