Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import * as lc from "vscode-languageclient/node";
import * as vscode from "vscode";

export class RaLanguageClient extends lc.LanguageClient {
    override error(message: string, data?: any, showNotification?: boolean | "force"): void {
        // ignore `Request TYPE failed.` errors
        const showError = vscode.workspace
            .getConfiguration("rust-analyzer")
            .get("showRequestFailedErrorNotification");
        if (!showError && message.startsWith("Request") && message.endsWith("failed.")) {
            return;
        }

        super.error(message, data, showNotification);
    }
}