private boolean match(EventCompletionContext context) {
        SchemaNode match = context.document.lexer().matchBackwardsOnLine(context.position, false, TokenType.FIELDS, TokenType.COLON);

        if (match != null && match.getRange().getStart().getLine() == context.position.getLine())return true;
        return false;
    }
FieldsCompletionProvider
For completing user defined fields in a fieldset.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/completion/provider/FieldsCompletion.java