@Override
	public List<CompletionItem> getCompletionItems(EventCompletionContext context) {
        Optional<SchemaNode> matched = match(context);
        if (matched.isEmpty()) return List.of();

        Symbol identifierSymbol = matched.get().getParent().getSymbol();

        List<CompletionItem> ret = new ArrayList<>();

        boolean defaultSeen = false;
        Symbol scope = (identifierSymbol.getType() == SymbolType.DOCUMENT 
                     || identifierSymbol.getType() == SymbolType.SCHEMA 
                     || identifierSymbol.getType() == SymbolType.RANK_PROFILE) 
                      ? null : identifierSymbol.getScope();

        for (var symbol : context.schemaIndex.listSymbolsInScope(scope, identifierSymbol.getType())) {
            // identifier-based comparison, since using symbol equality may be inaccurate in this context
            if (symbol.getShortIdentifier().equals(identifierSymbol.getShortIdentifier()))continue; 

            ret.add(CompletionUtils.constructBasic(symbol.getShortIdentifier(), symbol.getLongIdentifier()));
            if (symbol.getShortIdentifier().equals("default"))defaultSeen = true;
        }

        if (identifierSymbol.getType() == SymbolType.RANK_PROFILE && !defaultSeen)ret.add(CompletionUtils.constructBasic("default"));

        return ret;
	}
For completing user defined identifiers after "inherits".
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/completion/provider/InheritanceCompletion.java