public onResultLimitExceeded()

in src/util/limitExceededWarnings.ts [29:53]


    public onResultLimitExceeded(uri: string, maxResults: number, name: string): (uri: string) => void {
        return () => {
            let warning = this.pendingWarnings[uri];
            if (warning) {
                if (!warning.timeout) {
                    // already shown
                    return;
                }
                warning.features[name] = name;
                warning.timeout.refresh();
            } else {
                warning = { features: { [name]: name } };
                warning.timeout = setTimeout(() => {
                    this.connection.sendNotification(
                        resultLimitReachedNotificationType,
                        `${posix.basename(uri)}: For performance reasons, ${Object.keys(warning.features).join(
                            " and "
                        )} have been limited to ${maxResults} items.`
                    );
                    warning.timeout = undefined;
                }, 2000);
                this.pendingWarnings[uri] = warning;
            }
        };
    }